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,27 @@
defmodule Odinsea.Database.Schema.ShopRank do
@moduledoc """
Ecto schema for the shopranks table.
Represents shop rank definitions.
"""
use Ecto.Schema
import Ecto.Changeset
@primary_key {:id, :id, autogenerate: true}
schema "shopranks" do
field :shopid, :integer, default: 0
field :rank, :integer, default: 0
field :name, :string, default: ""
field :itemid, :integer, default: 0
end
@doc """
Changeset for creating/updating a shop rank.
"""
def changeset(shop_rank, attrs) do
shop_rank
|> cast(attrs, [:shopid, :rank, :name, :itemid])
|> validate_required([:shopid])
end
end