{"schemaVersion":5,"id":"project_52a47919-5324-4b03-a632-ff972a461305","name":"SaaS Multi-tenant Starter","dialect":"mysql","entities":[{"id":"entity_13c94a21-47d0-4632-a889-9c6284b12cf8","logicalName":"Tenant","physicalName":"tenants","description":"Tenant","x":0,"y":291,"width":360,"attributes":[{"id":"attribute_146172c4-2930-45f1-b6ae-91ac98dea7b3","logicalName":"Tenant Id","physicalName":"tenant_id","physicalNameManual":true,"description":"Tenant Id","dataType":"BIGINT","nullable":true,"primaryKey":true,"foreignKey":false,"unique":false,"autoIncrement":true},{"id":"attribute_1071f31d-c7e0-45d4-b936-46e5df3c0242","logicalName":"Tenant Name","physicalName":"tenant_name","physicalNameManual":true,"description":"Tenant Name","dataType":"VARCHAR(120)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false},{"id":"attribute_a8c03d0b-a9c2-4669-9597-f0b5b930084a","logicalName":"Tenant Slug","physicalName":"tenant_slug","physicalNameManual":true,"description":"Tenant Slug","dataType":"VARCHAR(60)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":true},{"id":"attribute_09a244dd-b733-491b-8201-16a1fb91862c","logicalName":"Created At","physicalName":"created_at","physicalNameManual":true,"description":"Created At","dataType":"TIMESTAMP","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false}],"indexes":[],"physicalNameManual":true},{"id":"entity_23bd71a1-7129-48d4-be9e-214e17f13d72","logicalName":"User","physicalName":"users","description":"User","x":0,"y":0,"width":360,"attributes":[{"id":"attribute_a81420c6-eef5-4b57-9e87-aaa259014670","logicalName":"User Id","physicalName":"user_id","physicalNameManual":true,"description":"User Id","dataType":"BIGINT","nullable":true,"primaryKey":true,"foreignKey":false,"unique":false,"autoIncrement":true},{"id":"attribute_cd96126f-f02b-4d83-9642-7b2894d94160","logicalName":"Email","physicalName":"email","physicalNameManual":true,"description":"Email","dataType":"varchar(255)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":true,"domain":"Email"},{"id":"attribute_9994e94b-fda2-40bd-ae40-20f477d25ed2","logicalName":"Display Name","physicalName":"display_name","physicalNameManual":true,"description":"Display Name","dataType":"VARCHAR(120)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false},{"id":"attribute_d878b67a-9e98-4964-9857-8bb056cdf89f","logicalName":"Created At","physicalName":"created_at","physicalNameManual":true,"description":"Created At","dataType":"TIMESTAMP","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false}],"indexes":[],"physicalNameManual":true},{"id":"entity_cd784fb2-a629-4465-a0bb-583040a7b095","logicalName":"Membership","physicalName":"memberships","description":"Membership","x":540,"y":120,"width":360,"attributes":[{"id":"attribute_40278c9b-adf7-4a4d-a054-ea453fce8efc","logicalName":"Membership Id","physicalName":"membership_id","physicalNameManual":true,"description":"Membership Id","dataType":"BIGINT","nullable":true,"primaryKey":true,"foreignKey":false,"unique":false,"autoIncrement":true},{"id":"attribute_cad3ee5d-c232-48fa-97ee-b47da7ae1f3c","logicalName":"Tenant Id","physicalName":"tenant_id","physicalNameManual":true,"description":"Tenant Id","dataType":"BIGINT","nullable":false,"primaryKey":false,"foreignKey":true,"unique":true,"indexed":true,"foreignKeyRelationshipId":"relationship_0cded47b-6e58-4ea9-b8c6-7bebd60c2f0b","referencesEntityId":"entity_13c94a21-47d0-4632-a889-9c6284b12cf8","referencesAttributeId":"attribute_146172c4-2930-45f1-b6ae-91ac98dea7b3"},{"id":"attribute_0d0eaa05-e8af-4013-be13-cc5138bc35b3","logicalName":"User Id","description":"User Id","dataType":"BIGINT","nullable":false,"primaryKey":false,"foreignKey":true,"foreignKeyRelationshipId":"relationship_71ac7798-68c1-4a32-b3a8-e31f79622972","referencesEntityId":"entity_23bd71a1-7129-48d4-be9e-214e17f13d72","referencesAttributeId":"attribute_a81420c6-eef5-4b57-9e87-aaa259014670","unique":true,"physicalName":"user_id","physicalNameManual":true},{"id":"attribute_0d53c526-175a-44d4-ac44-744a760c9446","logicalName":"Member Role","physicalName":"member_role","physicalNameManual":true,"description":"Member Role","dataType":"VARCHAR(30)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false},{"id":"attribute_5340448f-300e-40e0-892c-e3fb568c7a0a","logicalName":"Joined At","physicalName":"joined_at","physicalNameManual":true,"description":"Joined At","dataType":"TIMESTAMP","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false}],"indexes":[{"id":"index_183cfce4-2753-4c0d-8a40-4f0fb2621fae","name":"uk_memberships_tenant_user","unique":true,"columnIds":["attribute_cad3ee5d-c232-48fa-97ee-b47da7ae1f3c"]}],"physicalNameManual":true},{"id":"entity_ac04cfaf-6b13-4fac-9d6f-22a0fe41489b","logicalName":"Plan","physicalName":"plans","description":"Plan","x":0,"y":574,"width":360,"attributes":[{"id":"attribute_6841834d-e0f8-418d-b502-de6f210fd235","logicalName":"Plan Id","physicalName":"plan_id","physicalNameManual":true,"description":"Plan Id","dataType":"BIGINT","nullable":true,"primaryKey":true,"foreignKey":false,"unique":false,"autoIncrement":true},{"id":"attribute_faf5d457-0b09-48bf-b4d7-b9dde6a8b7b8","logicalName":"Plan Code","physicalName":"plan_code","physicalNameManual":true,"description":"Plan Code","dataType":"VARCHAR(40)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":true},{"id":"attribute_d2276d63-4d35-425b-bd45-e0e4866afd4d","logicalName":"Plan Name","physicalName":"plan_name","physicalNameManual":true,"description":"Plan Name","dataType":"VARCHAR(80)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false},{"id":"attribute_3bbe565a-5a35-4c78-9e88-a85c1e3877c4","logicalName":"Monthly Price","physicalName":"monthly_price","physicalNameManual":true,"description":"Monthly Price","dataType":"DECIMAL(10,2)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false},{"id":"attribute_a2165a69-eff3-4d25-8939-1f4c4d606d4f","logicalName":"Seat Limit","physicalName":"seat_limit","physicalNameManual":true,"description":"Seat Limit","dataType":"INT","nullable":true,"primaryKey":false,"foreignKey":false,"unique":false}],"indexes":[],"physicalNameManual":true},{"id":"entity_2c863ca2-04d2-4eb8-a4a5-4caa92f610df","logicalName":"Subscription","physicalName":"subscriptions","description":"Subscription","x":540,"y":428,"width":360,"attributes":[{"id":"attribute_a23b98f1-ffa1-4ef0-92ae-8c2a8e7136bb","logicalName":"Subscription Id","physicalName":"subscription_id","physicalNameManual":true,"description":"Subscription Id","dataType":"BIGINT","nullable":true,"primaryKey":true,"foreignKey":false,"unique":false,"autoIncrement":true},{"id":"attribute_849aa811-ce92-4742-9404-f244ce194298","logicalName":"Tenant Id","description":"Tenant Id","dataType":"BIGINT","nullable":false,"primaryKey":false,"foreignKey":true,"foreignKeyRelationshipId":"relationship_dc2b7cc3-4e62-4292-958e-8ca53a923d29","referencesEntityId":"entity_13c94a21-47d0-4632-a889-9c6284b12cf8","referencesAttributeId":"attribute_146172c4-2930-45f1-b6ae-91ac98dea7b3","unique":false,"physicalName":"tenant_id","physicalNameManual":true},{"id":"attribute_d70e3ce9-85ba-4699-90a9-262aaa5437ef","logicalName":"Plan Id","description":"Plan Id","dataType":"BIGINT","nullable":false,"primaryKey":false,"foreignKey":true,"foreignKeyRelationshipId":"relationship_db2947dc-48c8-473a-8818-9cd82a55be41","referencesEntityId":"entity_ac04cfaf-6b13-4fac-9d6f-22a0fe41489b","referencesAttributeId":"attribute_6841834d-e0f8-418d-b502-de6f210fd235","unique":false,"physicalName":"plan_id","physicalNameManual":true},{"id":"attribute_3070ed61-ce15-4e64-b339-fad404920162","logicalName":"Subscription Status","physicalName":"subscription_status","physicalNameManual":true,"description":"Subscription Status","dataType":"varchar(30)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false,"domain":"Status Code"},{"id":"attribute_2158620d-a613-4c25-a03a-1cd84fd7c184","logicalName":"Current Period End","physicalName":"current_period_end","physicalNameManual":true,"description":"Current Period End","dataType":"TIMESTAMP","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false}],"indexes":[],"physicalNameManual":true},{"id":"entity_d7fd7610-8fa6-43fe-b434-3eb4c9cf4817","logicalName":"Invoice","physicalName":"invoices","description":"Invoice","x":1080,"y":411,"width":360,"attributes":[{"id":"attribute_1e21f78c-46cb-4da9-8c38-1bb7a3be631d","logicalName":"Invoice Id","physicalName":"invoice_id","physicalNameManual":true,"description":"Invoice Id","dataType":"BIGINT","nullable":true,"primaryKey":true,"foreignKey":false,"unique":false,"autoIncrement":true},{"id":"attribute_f853878a-d276-4041-aafa-b8e23555d40c","logicalName":"Subscription Id","description":"Subscription Id","dataType":"BIGINT","nullable":false,"primaryKey":false,"foreignKey":true,"foreignKeyRelationshipId":"relationship_02e0b5d0-65cd-430c-adbe-4bc340e9776c","referencesEntityId":"entity_2c863ca2-04d2-4eb8-a4a5-4caa92f610df","referencesAttributeId":"attribute_a23b98f1-ffa1-4ef0-92ae-8c2a8e7136bb","unique":false,"physicalName":"subscription_id","physicalNameManual":true},{"id":"attribute_217374d6-c1a4-40c1-9f2c-6f0f6f8c3491","logicalName":"Invoice Number","physicalName":"invoice_number","physicalNameManual":true,"description":"Invoice Number","dataType":"VARCHAR(40)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":true},{"id":"attribute_e69fdd70-e0ea-4ef7-971a-36fc612a01de","logicalName":"Invoice Amount","physicalName":"invoice_amount","physicalNameManual":true,"description":"Invoice Amount","dataType":"decimal(12,2)","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false,"domain":"Money"},{"id":"attribute_485630e4-f2f0-4a76-b541-3e35f69e01ad","logicalName":"Issued At","physicalName":"issued_at","physicalNameManual":true,"description":"Issued At","dataType":"TIMESTAMP","nullable":false,"primaryKey":false,"foreignKey":false,"unique":false},{"id":"attribute_41e7a27e-6492-4a8a-9f06-929956daa8d1","logicalName":"Paid At","physicalName":"paid_at","physicalNameManual":true,"description":"Paid At","dataType":"TIMESTAMP","nullable":true,"primaryKey":false,"foreignKey":false,"unique":false}],"indexes":[],"physicalNameManual":true}],"relationships":[{"id":"relationship_0cded47b-6e58-4ea9-b8c6-7bebd60c2f0b","sourceEntityId":"entity_13c94a21-47d0-4632-a889-9c6284b12cf8","targetEntityId":"entity_cd784fb2-a629-4465-a0bb-583040a7b095","cardinality":"1:N","sourceEnd":"one","targetEnd":"zeroOrMany","relationshipType":"nonIdentifying","onDelete":"cascade","constraintName":"fk_memberships_tenant"},{"id":"relationship_71ac7798-68c1-4a32-b3a8-e31f79622972","sourceEntityId":"entity_23bd71a1-7129-48d4-be9e-214e17f13d72","targetEntityId":"entity_cd784fb2-a629-4465-a0bb-583040a7b095","cardinality":"1:N","sourceEnd":"one","targetEnd":"zeroOrMany","relationshipType":"nonIdentifying","onDelete":"cascade","constraintName":"fk_memberships_user"},{"id":"relationship_dc2b7cc3-4e62-4292-958e-8ca53a923d29","sourceEntityId":"entity_13c94a21-47d0-4632-a889-9c6284b12cf8","targetEntityId":"entity_2c863ca2-04d2-4eb8-a4a5-4caa92f610df","cardinality":"1:N","sourceEnd":"one","targetEnd":"zeroOrMany","relationshipType":"nonIdentifying","onDelete":"cascade","constraintName":"fk_subscriptions_tenant"},{"id":"relationship_db2947dc-48c8-473a-8818-9cd82a55be41","sourceEntityId":"entity_ac04cfaf-6b13-4fac-9d6f-22a0fe41489b","targetEntityId":"entity_2c863ca2-04d2-4eb8-a4a5-4caa92f610df","cardinality":"1:N","sourceEnd":"one","targetEnd":"zeroOrMany","relationshipType":"nonIdentifying","onDelete":"restrict","constraintName":"fk_subscriptions_plan"},{"id":"relationship_02e0b5d0-65cd-430c-adbe-4bc340e9776c","sourceEntityId":"entity_2c863ca2-04d2-4eb8-a4a5-4caa92f610df","targetEntityId":"entity_d7fd7610-8fa6-43fe-b434-3eb4c9cf4817","cardinality":"1:N","sourceEnd":"one","targetEnd":"zeroOrMany","relationshipType":"nonIdentifying","onDelete":"restrict","constraintName":"fk_invoices_subscription"}],"wordDictionary":{"entries":[{"id":"word_933beaa0-76f2-4857-8dc8-733ae1658992","logicalWord":"Amount","physicalWord":"AMOUNT","abbreviation":"","englishName":"","description":"Monetary value","enabled":true,"synonyms":[]},{"id":"word_adf874f1-1d52-431e-96a7-4b6011a14ccb","logicalWord":"At","physicalWord":"AT","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_99961caf-187b-43b7-a106-d6da202dde3e","logicalWord":"Code","physicalWord":"CODE","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_ebc10431-d68a-4ea4-9b7b-accac489bccb","logicalWord":"Created","physicalWord":"CREATED","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_1b7e3d8b-37fc-4f89-85ec-89f771bb64db","logicalWord":"Current","physicalWord":"CURRENT","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_8567e2ca-05b1-46ed-84fb-10ba1f7b2d0f","logicalWord":"Display","physicalWord":"DISPLAY","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_4f88ce90-d3c8-45f4-8164-98e9dffd7f44","logicalWord":"Email","physicalWord":"EMAIL","abbreviation":"","englishName":"","description":"Email address","enabled":true,"synonyms":[]},{"id":"word_860892d1-a75c-4806-be2b-6386627891a1","logicalWord":"End","physicalWord":"END","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_458ef072-a866-4346-94d4-9c2ba73be77e","logicalWord":"Id","physicalWord":"ID","abbreviation":"","englishName":"","description":"Unique key for a record","enabled":true,"synonyms":[]},{"id":"word_a89a0f42-d99e-4bf9-8b70-e9d9dc97861b","logicalWord":"Invoice","physicalWord":"INVOICE","abbreviation":"","englishName":"","description":"A billing document","enabled":true,"synonyms":[]},{"id":"word_eba3835b-cf12-4a5b-8cf1-88d8ad53a312","logicalWord":"Issued","physicalWord":"ISSUED","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_355f5df5-283b-410d-9982-849b0b022da9","logicalWord":"Joined","physicalWord":"JOINED","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_7f0e60f8-2705-4729-8dcd-4254a08661a2","logicalWord":"Limit","physicalWord":"LIMIT","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_efa8f08f-8574-4d15-a0c2-d580da84a1ae","logicalWord":"Member","physicalWord":"MEMBER","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_ee556d8b-a751-45dd-9971-211cc92b9d43","logicalWord":"Membership","physicalWord":"MEMBERSHIP","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_47e34e38-1b16-450b-8622-28b8c89dea69","logicalWord":"Monthly","physicalWord":"MONTHLY","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_3e7850a4-a0fe-44bf-9c33-8d4b0336c942","logicalWord":"Name","physicalWord":"NAME","abbreviation":"","englishName":"","description":"Human-readable label","enabled":true,"synonyms":[]},{"id":"word_d4c0ff7b-fac7-4e5c-94ce-4674874bdd56","logicalWord":"Number","physicalWord":"NUMBER","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_708908ea-11bd-49fc-a46b-a480857cbc85","logicalWord":"Paid","physicalWord":"PAID","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_c7eee991-6adb-4281-ac72-68923a6dccd4","logicalWord":"Period","physicalWord":"PERIOD","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_84dca25b-18f4-45a5-9143-09a3759c8952","logicalWord":"Plan","physicalWord":"PLAN","abbreviation":"","englishName":"","description":"A billable subscription tier","enabled":true,"synonyms":[]},{"id":"word_f611bc19-3021-4cd2-9563-64965075bc68","logicalWord":"Price","physicalWord":"PRICE","abbreviation":"","englishName":"","description":"Selling price of an item","enabled":true,"synonyms":[]},{"id":"word_14c2ae9c-7622-4688-b967-c489b16401b8","logicalWord":"Role","physicalWord":"ROLE","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_b6db3bdc-1152-4243-9de9-92bbb6b3fb9e","logicalWord":"Seat","physicalWord":"SEAT","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_ef92f4ff-f383-4b0d-879a-5ddabde5f18b","logicalWord":"Slug","physicalWord":"SLUG","abbreviation":"","englishName":"","description":"","enabled":true,"synonyms":[]},{"id":"word_3b9e31fc-af1d-442d-a14e-32048236ee56","logicalWord":"Status","physicalWord":"STATUS","abbreviation":"","englishName":"","description":"Lifecycle state of a record","enabled":true,"synonyms":[]},{"id":"word_5d370c83-e7f8-44bf-8442-792d84f63d7a","logicalWord":"Subscription","physicalWord":"SUBSCRIPTION","abbreviation":"","englishName":"","description":"An active plan for a tenant","enabled":true,"synonyms":[]},{"id":"word_eba5ed80-f6b3-4cc9-b601-58f2988393db","logicalWord":"Tenant","physicalWord":"TENANT","abbreviation":"","englishName":"","description":"An isolated customer organization","enabled":true,"synonyms":[]},{"id":"word_9394ab36-475b-44f8-835f-25c6bae4fddb","logicalWord":"User","physicalWord":"USER","abbreviation":"","englishName":"","description":"An account holder","enabled":true,"synonyms":[]}]},"domains":[{"id":"domain_4e454971-23ab-4fdb-9b1b-ab71bdea3bbc","name":"Email","dataType":"varchar(255)","description":"Email address"},{"id":"domain_5d9e4cf5-d941-46be-8cf0-c4cacb033b5e","name":"Money","dataType":"decimal(12,2)","description":"Monetary value"},{"id":"domain_d672fa3b-6f11-4edc-899a-a39cd465815b","name":"Status Code","dataType":"varchar(30)","description":"Lifecycle status value"}],"subjectAreas":[],"entityReferences":[],"notes":[],"namingRules":{"separator":"_","casing":"lower","unknownWordMode":"warn"},"viewport":{"x":0,"y":0,"zoom":1},"updatedAt":"2026-08-05T03:55:45.836Z"}