ash_postgres/test/support/resources/rating.ex
2022-04-19 11:08:44 -04:00

20 lines
378 B
Elixir

defmodule AshPostgres.Test.Rating do
@moduledoc false
use Ash.Resource,
data_layer: AshPostgres.DataLayer
postgres do
polymorphic?(true)
repo AshPostgres.TestRepo
end
actions do
defaults([:create, :read, :update, :destroy])
end
attributes do
uuid_primary_key(:id)
attribute(:score, :integer)
attribute(:resource_id, :uuid)
end
end