Entity tenant
An isolated customer organisation.
pii: none
Properties
| Property | Value |
|---|---|
| owner | platform |
Attributes
| # | Name | Type | Null | Default | Key | Terms | Description |
|---|---|---|---|---|---|---|---|
| 1 | id | bigint | no | PK | |||
| 2 | slug | text(63) | no | UQ | |||
| 3 | name | text(200) | no | ||||
| 4 | created_at | timestamptz | no | expr "now()" |
Keys
| Kind | Name | Attributes |
|---|---|---|
| primary | pk_tenant | id |
| unique | uq_tenant_slug | slug |
Relationships
| Name | Role | Other entity | Cardinality | Attributes | Identifying | On delete | On update |
|---|---|---|---|---|---|---|---|
| api_key_tenant | parent | api_key | one to many | api_key.tenant_id -> tenant.id | no | cascade | no_action |
| invoice_line_tenant | parent | invoice_line | one to many | invoice_line.tenant_id -> tenant.id | no | cascade | no_action |
| invoice_tenant | parent | invoice | one to many | invoice.tenant_id -> tenant.id | no | cascade | no_action |
| membership_tenant | parent | membership | one to many | membership.tenant_id -> tenant.id | yes | cascade | no_action |
| subscription_tenant | parent | subscription | one to many | subscription.tenant_id -> tenant.id | no | cascade | no_action |
| user_tenant | parent | user | one to many | user.tenant_id -> tenant.id | no | cascade | no_action |
Physical
lite (sqlite): main.tenant
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | id | integer | no | by_default | id | |||
| 2 | slug | text | no | slug | ||||
| 3 | name | text | no | name | ||||
| 4 | created_at | text | no | expr "CURRENT_TIMESTAMP" | created_at |
- primary key pk_tenant (id)
- unique uq_tenant_slug (slug)
pg (postgresql): app.tenant
An isolated customer organisation.
| # | Name | Type | Null | Default | Identity | Collation | Attribute | Comment |
|---|---|---|---|---|---|---|---|---|
| 1 | id | bigint | no | always | id | |||
| 2 | slug | varchar(63) | no | slug | ||||
| 3 | name | varchar(200) | no | name | ||||
| 4 | created_at | timestamp with time zone | no | expr "now()" | created_at |
- primary key pk_tenant (id)
- unique uq_tenant_slug (slug)