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.CharacterSlot do
@moduledoc """
Ecto schema for the character_slots table.
Represents character slot counts per world.
"""
use Ecto.Schema
import Ecto.Changeset
@primary_key {:id, :id, autogenerate: true}
schema "character_slots" do
field :accid, :integer, default: 0
field :worldid, :integer, default: 0
field :charslots, :integer, default: 6
end
@doc """
Changeset for creating/updating character slots.
"""
def changeset(character_slot, attrs) do
character_slot
|> cast(attrs, [:accid, :worldid, :charslots])
|> validate_required([:accid, :worldid])
end
end