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
|
2024-03-28 09:52:28 +13:00
|
|
|
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
|
2024-03-28 09:52:28 +13:00
|
|
|
attribute(:title, :string, public?: true)
|
|
|
|
attribute(:bio, :string, public?: true)
|
|
|
|
attribute(:years_of_experience, :integer, public?: true)
|
2022-12-18 20:35:42 +13:00
|
|
|
|
|
|
|
attribute :list_of_strings, {:array, :string} do
|
2024-03-28 09:52:28 +13:00
|
|
|
public?(true)
|
2022-12-18 20:35:42 +13:00
|
|
|
allow_nil?(true)
|
|
|
|
default(nil)
|
|
|
|
end
|
2022-02-08 10:48:36 +13:00
|
|
|
end
|
|
|
|
end
|