mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 21:43:12 +12:00
37cc01957d
* WIP * chore: fix mix.lock merge issues * improvement: upgrade to 3.0 * chore: remove `repo.to_tenant` * chore: continue removal of unnecessary helper * chore: use `Ash.ToTenant`
29 lines
570 B
Elixir
29 lines
570 B
Elixir
defmodule AshPostgres.Test.Profile do
|
|
@moduledoc false
|
|
use Ash.Resource,
|
|
domain: AshPostgres.Test.Domain,
|
|
data_layer: AshPostgres.DataLayer
|
|
|
|
postgres do
|
|
table("profile")
|
|
schema("profiles")
|
|
repo(AshPostgres.TestRepo)
|
|
end
|
|
|
|
attributes do
|
|
uuid_primary_key(:id, writable?: true)
|
|
attribute(:description, :string, public?: true)
|
|
end
|
|
|
|
actions do
|
|
default_accept(:*)
|
|
|
|
defaults([:create, :read, :update, :destroy])
|
|
end
|
|
|
|
relationships do
|
|
belongs_to(:author, AshPostgres.Test.Author) do
|
|
public?(true)
|
|
end
|
|
end
|
|
end
|