sloanelybutsurely.com/lib/schema/post.ex
2025-03-25 21:54:52 -04:00

21 lines
403 B
Elixir

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