How to model this kind of project in Ash?

Greetings family, I have a similar concern. My project has users who have no organizations and users with one as such a model that registers user, onboards and create organization or skipp after user creation addresses my need. Just seeking an efficient model. any help will be appreciated

@btajudeen the User and Organisation resource should not be multitenant. They should reside outside a tenant. But if you real want them to be part of a tenant, you will have to make these resources global to have records that belong to a tenant and others that don’t.

def MyApp.Accounts.Users do
    use Ash.Resource,

    multitenancy do
      strategy :context
      # Tell Ash that the records of this resource can be part of a tenant or not
      global? true
    end
end
1 Like