Files
runosaari.net/lib/runosaari/schedule/performance.ex
2021-04-24 23:53:41 +03:00

21 lines
443 B
Elixir

defmodule Runosaari.Schedule.Performance do
use Ecto.Schema
import Ecto.Changeset
schema "performances" do
field :description, :string
field :notes, :string
field :time, :naive_datetime
field :performer_id, :id
timestamps()
end
@doc false
def changeset(performance, attrs) do
performance
|> cast(attrs, [:time, :description, :notes])
|> validate_required([:time, :description, :notes])
end
end