defmodule Schema.Post do @moduledoc false use Schema @post_kinds ~w[status blog]a schema "posts" do field :tid, :string field :kind, Ecto.Enum, values: @post_kinds field :slug, :string field :title, :string field :body, :string field :published_at, :utc_datetime_usec field :deleted_at, :utc_datetime_usec timestamps() end def kinds, do: @post_kinds end