2022-07-22 02:19:47 +12:00
|
|
|
defmodule Ash.Test.Support.PolicyRbac.Organization do
|
2022-05-18 07:56:40 +12:00
|
|
|
@moduledoc false
|
|
|
|
use Ash.Resource,
|
|
|
|
data_layer: Ash.DataLayer.Ets
|
|
|
|
|
|
|
|
ets do
|
|
|
|
private?(true)
|
|
|
|
end
|
|
|
|
|
|
|
|
actions do
|
|
|
|
defaults [:create, :read, :update, :destroy]
|
|
|
|
end
|
|
|
|
|
|
|
|
attributes do
|
|
|
|
uuid_primary_key(:id)
|
|
|
|
end
|
|
|
|
|
|
|
|
relationships do
|
2022-07-22 02:19:47 +12:00
|
|
|
has_many :memberships, Ash.Test.Support.PolicyRbac.Membership do
|
2022-08-16 06:00:02 +12:00
|
|
|
destination_attribute(:organization_id)
|
2022-05-18 07:56:40 +12:00
|
|
|
end
|
2022-12-20 21:12:40 +13:00
|
|
|
|
|
|
|
has_many :files, Ash.Test.Support.PolicyRbac.File
|
2022-05-18 07:56:40 +12:00
|
|
|
end
|
|
|
|
end
|