Changed the bidding round status field from "running" to "stopped".

This commit is contained in:
2026-02-12 11:00:14 +01:00
parent 647da6c9d7
commit e01042130e
6 changed files with 43 additions and 20 deletions

View File

@ -6,7 +6,7 @@ defmodule BeetRoundServer.BiddingRounds.BiddingRound do
@foreign_key_type :binary_id
schema "bidding_rounds" do
field :round_number, :integer
field :running, :boolean, default: false
field :stopped, :boolean, default: false
timestamps(type: :utc_datetime)
end
@ -14,7 +14,7 @@ defmodule BeetRoundServer.BiddingRounds.BiddingRound do
@doc false
def changeset(bidding_round, attrs) do
bidding_round
|> cast(attrs, [:round_number, :running])
|> validate_required([:round_number, :running])
|> cast(attrs, [:round_number, :stopped])
|> validate_required([:round_number, :stopped])
end
end

View File

@ -19,7 +19,7 @@ defmodule BeetRoundServerWeb.BiddingRoundJSON do
%{
id: bidding_round.id,
round_number: bidding_round.round_number,
running: bidding_round.running
stopped: bidding_round.stopped
}
end
end