After "mix phx.gen.json BiddingRounds BiddingRound bidding_rounds round_number:integer running:boolean --no-scope".

This commit is contained in:
2026-02-11 10:57:27 +01:00
parent 5f966d485a
commit 14f04befd0
11 changed files with 429 additions and 3 deletions

View File

@ -0,0 +1,20 @@
defmodule BeetRoundServer.BiddingRounds.BiddingRound do
use Ecto.Schema
import Ecto.Changeset
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
schema "bidding_rounds" do
field :round_number, :integer
field :running, :boolean, default: false
timestamps(type: :utc_datetime)
end
@doc false
def changeset(bidding_round, attrs) do
bidding_round
|> cast(attrs, [:round_number, :running])
|> validate_required([:round_number, :running])
end
end