port over some more
This commit is contained in:
24
lib/odinsea/database/schema/wishlist.ex
Normal file
24
lib/odinsea/database/schema/wishlist.ex
Normal file
@@ -0,0 +1,24 @@
|
||||
defmodule Odinsea.Database.Schema.Wishlist do
|
||||
@moduledoc """
|
||||
Ecto schema for the wishlist table.
|
||||
Represents cash shop wishlist items for characters.
|
||||
"""
|
||||
|
||||
use Ecto.Schema
|
||||
import Ecto.Changeset
|
||||
|
||||
@primary_key false
|
||||
schema "wishlist" do
|
||||
field :characterid, :integer, primary_key: true
|
||||
field :sn, :integer, primary_key: true
|
||||
end
|
||||
|
||||
@doc """
|
||||
Changeset for creating a wishlist entry.
|
||||
"""
|
||||
def changeset(wishlist, attrs) do
|
||||
wishlist
|
||||
|> cast(attrs, [:characterid, :sn])
|
||||
|> validate_required([:characterid, :sn])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user