mirror of
https://github.com/ash-project/ash_phoenix.git
synced 2024-09-20 15:22:49 +12:00
18 lines
342 B
Elixir
18 lines
342 B
Elixir
defmodule AshPhoenix.Test.PostWithDefault do
|
|
@moduledoc false
|
|
use Ash.Resource, data_layer: Ash.DataLayer.Ets
|
|
|
|
ets do
|
|
private?(true)
|
|
end
|
|
|
|
actions do
|
|
defaults([:create])
|
|
end
|
|
|
|
attributes do
|
|
uuid_primary_key(:id)
|
|
attribute(:text, :string, allow_nil?: false, default: "foo")
|
|
attribute(:title, :string)
|
|
end
|
|
end
|