AUTOGEN: Performances.

This commit is contained in:
codevictory
2021-03-30 22:50:21 +03:00
parent adacd91591
commit 1ae7c26b5a
12 changed files with 450 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
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 :location_id, :id
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