port over some more

This commit is contained in:
ra
2026-02-14 23:58:01 -07:00
parent 0222be36c5
commit 61176cd416
107 changed files with 9124 additions and 375 deletions

View File

@@ -0,0 +1,26 @@
defmodule Odinsea.Database.Schema.CompensationLog do
@moduledoc """
Ecto schema for the compensationlog_confirmed table.
Represents compensation records for players.
"""
use Ecto.Schema
import Ecto.Changeset
@primary_key {:chrname, :string, autogenerate: false}
schema "compensationlog_confirmed" do
field :donor, :integer, default: 0
field :value, :integer, default: 0
field :taken, :integer, default: 0
end
@doc """
Changeset for compensation log.
"""
def changeset(compensation_log, attrs) do
compensation_log
|> cast(attrs, [:chrname, :donor, :value, :taken])
|> validate_required([:chrname])
end
end