2023-09-23 14:52:22 +12:00
|
|
|
defmodule AshSqlite.Test.Rating do
|
|
|
|
@moduledoc false
|
|
|
|
use Ash.Resource,
|
2024-04-02 05:18:42 +13:00
|
|
|
domain: AshSqlite.Test.Domain,
|
2023-09-23 14:52:22 +12:00
|
|
|
data_layer: AshSqlite.DataLayer
|
|
|
|
|
|
|
|
sqlite do
|
|
|
|
polymorphic?(true)
|
|
|
|
repo AshSqlite.TestRepo
|
|
|
|
end
|
|
|
|
|
|
|
|
actions do
|
2024-04-02 05:18:42 +13:00
|
|
|
default_accept(:*)
|
2023-09-23 14:52:22 +12:00
|
|
|
defaults([:create, :read, :update, :destroy])
|
|
|
|
end
|
|
|
|
|
|
|
|
attributes do
|
|
|
|
uuid_primary_key(:id)
|
2024-04-02 05:18:42 +13:00
|
|
|
attribute(:score, :integer, public?: true)
|
|
|
|
attribute(:resource_id, :uuid, public?: true)
|
2023-09-23 14:52:22 +12:00
|
|
|
end
|
|
|
|
end
|