add default value for note kind

This commit is contained in:
Inhji 2023-03-30 22:54:15 +02:00
parent d97be57871
commit 671049b4fc

View file

@ -5,7 +5,7 @@ defmodule Chiya.Notes.Note do
@derive {Jason.Encoder, only: [:id, :name, :content, :slug, :channels]} @derive {Jason.Encoder, only: [:id, :name, :content, :slug, :channels]}
schema "notes" do schema "notes" do
field :content, :string field :content, :string
field :kind, Ecto.Enum, values: [:post, :bookmark] field :kind, Ecto.Enum, values: [:post, :bookmark], default: :post
field :name, :string field :name, :string
field :published_at, :naive_datetime field :published_at, :naive_datetime
field :slug, :string field :slug, :string