defmodule Cake.Layers.Record do use Ecto.Schema import Ecto.Changeset schema "layer_records" do field :id, Ecto.UUID field :status, :string field :story, Ecto.UUID field :values, :map field :template, :id field :owner, :id timestamps() end @doc false def changeset(record, attrs) do record |> cast(attrs, [:id, :story, :values, :status]) |> validate_required([:id, :story, :values, :status]) end end