ash_postgres/test/support/resources/comment.ex
2021-01-12 20:22:28 -05:00

24 lines
398 B
Elixir

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