ash_postgres/test/support/resources/bio.ex

23 lines
491 B
Elixir
Raw Normal View History

2022-02-08 10:48:36 +13:00
defmodule AshPostgres.Test.Bio do
@moduledoc false
use Ash.Resource, data_layer: :embedded
2022-04-20 03:08:28 +12:00
actions do
default_accept(:*)
2022-04-20 03:08:28 +12:00
defaults([:create, :read, :update, :destroy])
end
2022-02-08 10:48:36 +13:00
attributes do
attribute(:title, :string, public?: true)
attribute(:bio, :string, public?: true)
attribute(:years_of_experience, :integer, public?: true)
attribute :list_of_strings, {:array, :string} do
public?(true)
allow_nil?(true)
default(nil)
end
2022-02-08 10:48:36 +13:00
end
end