lib/client_portal/accounts/user.ex
defmodule ClientPortal.Accounts.User do
use Ash.Resource,
otp_app: :client_portal,
domain: ClientPortal.Accounts,
data_layer: AshPostgres.DataLayer,
authorizers: [Ash.Policy.Authorizer],
extensions: [AshAuthentication]
...
attributes do
uuid_primary_key :id
...
end
relationships do
belongs_to :organisation, ClientPortal.Accounts.Organisation
end
lib/client_portal/accounts/user.ex
defmodule ClientPortal.Accounts.User do
use Ash.Resource,
otp_app: :client_portal,
domain: ClientPortal.Accounts,
data_layer: AshPostgres.DataLayer,
authorizers: [Ash.Policy.Authorizer],
extensions: [AshAuthentication]
...
attributes do
uuid_primary_key :id
...
end
relationships do
belongs_to :organisation, ClientPortal.Accounts.Organisation
end