ash_postgres/test/support/resources/rating.ex

24 lines
469 B
Elixir
Raw Normal View History

defmodule AshPostgres.Test.Rating do
@moduledoc false
use Ash.Resource,
domain: AshPostgres.Test.Domain,
data_layer: AshPostgres.DataLayer
postgres do
polymorphic?(true)
repo AshPostgres.TestRepo
end
actions do
default_accept(:*)
2022-04-20 03:08:28 +12:00
defaults([:create, :read, :update, :destroy])
end
attributes do
uuid_primary_key(:id)
attribute(:score, :integer, public?: true)
attribute(:resource_id, :uuid, public?: true)
end
end