ash_sqlite/test/support/resources/profile.ex

26 lines
518 B
Elixir
Raw Normal View History

2023-09-23 14:52:22 +12:00
defmodule AshSqlite.Test.Profile do
@moduledoc false
use Ash.Resource,
domain: AshSqlite.Test.Domain,
2023-09-23 14:52:22 +12:00
data_layer: AshSqlite.DataLayer
sqlite do
table("profile")
repo(AshSqlite.TestRepo)
end
attributes do
uuid_primary_key(:id, writable?: true)
attribute(:description, :string, public?: true)
2023-09-23 14:52:22 +12:00
end
actions do
default_accept(:*)
2023-09-23 14:52:22 +12:00
defaults([:create, :read, :update, :destroy])
end
relationships do
belongs_to(:author, AshSqlite.Test.Author, public?: true)
2023-09-23 14:52:22 +12:00
end
end