Mermaid Diagram Generator n Editor

SaaS Multi-Tenant Schema

Organizations, the users they employ, and the subscription/invoice chain that bills them — the shape most B2B SaaS apps start from.

Mermaid source
erDiagram
    ORGANIZATION ||--o{ USER : employs
    ORGANIZATION ||--|| SUBSCRIPTION : has
    SUBSCRIPTION ||--o{ INVOICE : generates
    ORGANIZATION {
        int id PK
        string name
        string plan
    }
    USER {
        int id PK
        int org_id FK
        string email
        string role
    }
    SUBSCRIPTION {
        int id PK
        int org_id FK
        string tier
        date renews_at
    }
    INVOICE {
        int id PK
        int subscription_id FK
        decimal amount
        date issued_at
    }
SaaS Multi-Tenant SchemaOpen in editor →

Category: Data · Tags: database, saas, er-diagram