ash_postgres/test/support/resources/comment.ex

25 lines
398 B
Elixir
Raw Normal View History

defmodule AshPostgres.Test.Comment do
@moduledoc false
use Ash.Resource,
data_layer: AshPostgres.DataLayer
postgres do
table "comments"
repo AshPostgres.TestRepo
end
actions do
2021-01-13 14:22:28 +13:00
read(:read)
create(:create)
end
attributes do
2021-01-13 14:22:28 +13:00
uuid_primary_key(:id)
attribute(:title, :string)
end
relationships do
2021-01-13 14:22:28 +13:00
belongs_to(:post, AshPostgres.Test.Post)
end
end