"""Tenant related constants and mappings.""" # Constants for tenant types ACCOUNT_TENANT_TYPE = 'account' SUBACCOUNT_TENANT_TYPE = 'subaccount' LABEL_PARTICIPANT_TENANT_TYPE = 'label_participant' COLLABORATOR_TENANT_TYPE = 'collaborator' # neo4j resource label constants SUBACCOUNT_RESOURCE_TYPE = 'Subaccount' SUBACCOUNT_NEO4J_RESOURCE_TYPE = 'SubAccount' VENDOR_RESOURCE_TYPE = 'Vendor' ARTIST_INFO_RESOURCE_TYPE = 'ArtistInfo' LABEL_RESOURCE_TYPE = 'Label' LABELPARTICIPANT_RESOURCE_TYPE = 'LabelParticipant' COLLABORATOR_RESOURCE_TYPE = 'Collaborator' COMPANY_BRAND_RESOURCE_TYPE = 'CompanyBrand' # A mapping of supported tenant types to neo4j labels. TENANT_TYPE_TO_NEO_MAPPING = { ACCOUNT_TENANT_TYPE: VENDOR_RESOURCE_TYPE, SUBACCOUNT_TENANT_TYPE: SUBACCOUNT_RESOURCE_TYPE, LABEL_PARTICIPANT_TENANT_TYPE: LABELPARTICIPANT_RESOURCE_TYPE, COLLABORATOR_TENANT_TYPE: COLLABORATOR_RESOURCE_TYPE, } # A mapping of neo4j labels to tenant types. NEO_TO_TENANT_TYPE_MAPPING = { VENDOR_RESOURCE_TYPE: ACCOUNT_TENANT_TYPE, SUBACCOUNT_RESOURCE_TYPE: SUBACCOUNT_TENANT_TYPE, LABELPARTICIPANT_RESOURCE_TYPE: LABEL_PARTICIPANT_TENANT_TYPE, COLLABORATOR_RESOURCE_TYPE: COLLABORATOR_TENANT_TYPE, }