2237 lines
55 KiB
JSON
2237 lines
55 KiB
JSON
|
|
{
|
||
|
|
"id": "8dd69b2d-ae27-4311-8fd1-d561832a7f63",
|
||
|
|
"prevId": "c9f30133-0e6b-4b83-ace2-3ee97f73ccf0",
|
||
|
|
"version": "7",
|
||
|
|
"dialect": "postgresql",
|
||
|
|
"tables": {
|
||
|
|
"public.account": {
|
||
|
|
"name": "account",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"accountId": {
|
||
|
|
"name": "accountId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"providerId": {
|
||
|
|
"name": "providerId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"userId": {
|
||
|
|
"name": "userId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"accessToken": {
|
||
|
|
"name": "accessToken",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"refreshToken": {
|
||
|
|
"name": "refreshToken",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"idToken": {
|
||
|
|
"name": "idToken",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"accessTokenExpiresAt": {
|
||
|
|
"name": "accessTokenExpiresAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"refreshTokenExpiresAt": {
|
||
|
|
"name": "refreshTokenExpiresAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"scope": {
|
||
|
|
"name": "scope",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"password": {
|
||
|
|
"name": "password",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"account_userId_user_id_fk": {
|
||
|
|
"name": "account_userId_user_id_fk",
|
||
|
|
"tableFrom": "account",
|
||
|
|
"tableTo": "user",
|
||
|
|
"columnsFrom": [
|
||
|
|
"userId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.passkey": {
|
||
|
|
"name": "passkey",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"publicKey": {
|
||
|
|
"name": "publicKey",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"userId": {
|
||
|
|
"name": "userId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"credentialID": {
|
||
|
|
"name": "credentialID",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"counter": {
|
||
|
|
"name": "counter",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"deviceType": {
|
||
|
|
"name": "deviceType",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"backedUp": {
|
||
|
|
"name": "backedUp",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"transports": {
|
||
|
|
"name": "transports",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"aaguid": {
|
||
|
|
"name": "aaguid",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"passkey_userId_user_id_fk": {
|
||
|
|
"name": "passkey_userId_user_id_fk",
|
||
|
|
"tableFrom": "passkey",
|
||
|
|
"tableTo": "user",
|
||
|
|
"columnsFrom": [
|
||
|
|
"userId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.session": {
|
||
|
|
"name": "session",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"expiresAt": {
|
||
|
|
"name": "expiresAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"token": {
|
||
|
|
"name": "token",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"ipAddress": {
|
||
|
|
"name": "ipAddress",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"userAgent": {
|
||
|
|
"name": "userAgent",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"impersonatedBy": {
|
||
|
|
"name": "impersonatedBy",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"userId": {
|
||
|
|
"name": "userId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"session_userId_user_id_fk": {
|
||
|
|
"name": "session_userId_user_id_fk",
|
||
|
|
"tableFrom": "session",
|
||
|
|
"tableTo": "user",
|
||
|
|
"columnsFrom": [
|
||
|
|
"userId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"session_token_unique": {
|
||
|
|
"name": "session_token_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"token"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.twoFactor": {
|
||
|
|
"name": "twoFactor",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"userId": {
|
||
|
|
"name": "userId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"secret": {
|
||
|
|
"name": "secret",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"backupCodes": {
|
||
|
|
"name": "backupCodes",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"enabled": {
|
||
|
|
"name": "enabled",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"twoFactor_userId_user_id_fk": {
|
||
|
|
"name": "twoFactor_userId_user_id_fk",
|
||
|
|
"tableFrom": "twoFactor",
|
||
|
|
"tableTo": "user",
|
||
|
|
"columnsFrom": [
|
||
|
|
"userId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.user": {
|
||
|
|
"name": "user",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"email": {
|
||
|
|
"name": "email",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"role": {
|
||
|
|
"name": "role",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'tenant_member'"
|
||
|
|
},
|
||
|
|
"twoFactorEnabled": {
|
||
|
|
"name": "twoFactorEnabled",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"twoFactorRecoveryRequired": {
|
||
|
|
"name": "twoFactorRecoveryRequired",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"twoFactorRecoveryStartedAt": {
|
||
|
|
"name": "twoFactorRecoveryStartedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"twoFactorRecoveryStartedBy": {
|
||
|
|
"name": "twoFactorRecoveryStartedBy",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"banned": {
|
||
|
|
"name": "banned",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"banReason": {
|
||
|
|
"name": "banReason",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"banExpires": {
|
||
|
|
"name": "banExpires",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"emailVerified": {
|
||
|
|
"name": "emailVerified",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"image": {
|
||
|
|
"name": "image",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"theme": {
|
||
|
|
"name": "theme",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"user_email_unique": {
|
||
|
|
"name": "user_email_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"email"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.verification": {
|
||
|
|
"name": "verification",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"identifier": {
|
||
|
|
"name": "identifier",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"value": {
|
||
|
|
"name": "value",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"expiresAt": {
|
||
|
|
"name": "expiresAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.events": {
|
||
|
|
"name": "events",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"groupId": {
|
||
|
|
"name": "groupId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"responsibleUserId": {
|
||
|
|
"name": "responsibleUserId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"slug": {
|
||
|
|
"name": "slug",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"startDate": {
|
||
|
|
"name": "startDate",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"startTime": {
|
||
|
|
"name": "startTime",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"endDate": {
|
||
|
|
"name": "endDate",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"endTime": {
|
||
|
|
"name": "endTime",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"location": {
|
||
|
|
"name": "location",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"published": {
|
||
|
|
"name": "published",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"visibility": {
|
||
|
|
"name": "visibility",
|
||
|
|
"type": "visibility",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'public'"
|
||
|
|
},
|
||
|
|
"printYear": {
|
||
|
|
"name": "printYear",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"isPrintable": {
|
||
|
|
"name": "isPrintable",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"events_tenantId_tenants_id_fk": {
|
||
|
|
"name": "events_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "events",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"events_groupId_groups_id_fk": {
|
||
|
|
"name": "events_groupId_groups_id_fk",
|
||
|
|
"tableFrom": "events",
|
||
|
|
"tableTo": "groups",
|
||
|
|
"columnsFrom": [
|
||
|
|
"groupId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"events_responsibleUserId_user_id_fk": {
|
||
|
|
"name": "events_responsibleUserId_user_id_fk",
|
||
|
|
"tableFrom": "events",
|
||
|
|
"tableTo": "user",
|
||
|
|
"columnsFrom": [
|
||
|
|
"responsibleUserId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.groups": {
|
||
|
|
"name": "groups",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"code": {
|
||
|
|
"name": "code",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sortOrder": {
|
||
|
|
"name": "sortOrder",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"groups_tenantId_tenants_id_fk": {
|
||
|
|
"name": "groups_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "groups",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.houseBookings": {
|
||
|
|
"name": "houseBookings",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"houseId": {
|
||
|
|
"name": "houseId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"startDate": {
|
||
|
|
"name": "startDate",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"endDate": {
|
||
|
|
"name": "endDate",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"bookingType": {
|
||
|
|
"name": "bookingType",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'private'"
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"internalNotes": {
|
||
|
|
"name": "internalNotes",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'confirmed'"
|
||
|
|
},
|
||
|
|
"isPublic": {
|
||
|
|
"name": "isPublic",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"houseBookings_houseId_houses_id_fk": {
|
||
|
|
"name": "houseBookings_houseId_houses_id_fk",
|
||
|
|
"tableFrom": "houseBookings",
|
||
|
|
"tableTo": "houses",
|
||
|
|
"columnsFrom": [
|
||
|
|
"houseId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.houses": {
|
||
|
|
"name": "houses",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"ownerOrganization": {
|
||
|
|
"name": "ownerOrganization",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"lesseeTenantId": {
|
||
|
|
"name": "lesseeTenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"houses_lesseeTenantId_tenants_id_fk": {
|
||
|
|
"name": "houses_lesseeTenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "houses",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"lesseeTenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.members": {
|
||
|
|
"name": "members",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"userId": {
|
||
|
|
"name": "userId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"firstName": {
|
||
|
|
"name": "firstName",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"lastName": {
|
||
|
|
"name": "lastName",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"email": {
|
||
|
|
"name": "email",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"phone": {
|
||
|
|
"name": "phone",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"mobile": {
|
||
|
|
"name": "mobile",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"street": {
|
||
|
|
"name": "street",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"postalCode": {
|
||
|
|
"name": "postalCode",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"city": {
|
||
|
|
"name": "city",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"isNaturfreund": {
|
||
|
|
"name": "isNaturfreund",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"hadOldWebsiteAccess": {
|
||
|
|
"name": "hadOldWebsiteAccess",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"members_tenantId_tenants_id_fk": {
|
||
|
|
"name": "members_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "members",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"members_userId_user_id_fk": {
|
||
|
|
"name": "members_userId_user_id_fk",
|
||
|
|
"tableFrom": "members",
|
||
|
|
"tableTo": "user",
|
||
|
|
"columnsFrom": [
|
||
|
|
"userId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.news": {
|
||
|
|
"name": "news",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"slug": {
|
||
|
|
"name": "slug",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"teaser": {
|
||
|
|
"name": "teaser",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"content": {
|
||
|
|
"name": "content",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"coverImage": {
|
||
|
|
"name": "coverImage",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"source": {
|
||
|
|
"name": "source",
|
||
|
|
"type": "news_source",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'native'"
|
||
|
|
},
|
||
|
|
"lifecycleStatus": {
|
||
|
|
"name": "lifecycleStatus",
|
||
|
|
"type": "news_lifecycle_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'draft'"
|
||
|
|
},
|
||
|
|
"isPinned": {
|
||
|
|
"name": "isPinned",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"archivedAt": {
|
||
|
|
"name": "archivedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "news_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'draft'"
|
||
|
|
},
|
||
|
|
"visibility": {
|
||
|
|
"name": "visibility",
|
||
|
|
"type": "visibility",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'public'"
|
||
|
|
},
|
||
|
|
"publishedAt": {
|
||
|
|
"name": "publishedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"authorId": {
|
||
|
|
"name": "authorId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"news_tenantId_tenants_id_fk": {
|
||
|
|
"name": "news_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "news",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"news_authorId_user_id_fk": {
|
||
|
|
"name": "news_authorId_user_id_fk",
|
||
|
|
"tableFrom": "news",
|
||
|
|
"tableTo": "user",
|
||
|
|
"columnsFrom": [
|
||
|
|
"authorId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"news_slug_unique": {
|
||
|
|
"name": "news_slug_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"slug"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.permissions": {
|
||
|
|
"name": "permissions",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"key": {
|
||
|
|
"name": "key",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"label": {
|
||
|
|
"name": "label",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"category": {
|
||
|
|
"name": "category",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sortOrder": {
|
||
|
|
"name": "sortOrder",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"isPlatformOnly": {
|
||
|
|
"name": "isPlatformOnly",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.role_permissions": {
|
||
|
|
"name": "role_permissions",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"roleId": {
|
||
|
|
"name": "roleId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"permissionKey": {
|
||
|
|
"name": "permissionKey",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"role_permissions_roleId_roles_roleId_fk": {
|
||
|
|
"name": "role_permissions_roleId_roles_roleId_fk",
|
||
|
|
"tableFrom": "role_permissions",
|
||
|
|
"tableTo": "roles",
|
||
|
|
"columnsFrom": [
|
||
|
|
"roleId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"roleId"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"role_permissions_permissionKey_permissions_key_fk": {
|
||
|
|
"name": "role_permissions_permissionKey_permissions_key_fk",
|
||
|
|
"tableFrom": "role_permissions",
|
||
|
|
"tableTo": "permissions",
|
||
|
|
"columnsFrom": [
|
||
|
|
"permissionKey"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"key"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {
|
||
|
|
"role_permissions_roleId_permissionKey_pk": {
|
||
|
|
"name": "role_permissions_roleId_permissionKey_pk",
|
||
|
|
"columns": [
|
||
|
|
"roleId",
|
||
|
|
"permissionKey"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.roles": {
|
||
|
|
"name": "roles",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"roleId": {
|
||
|
|
"name": "roleId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"scope": {
|
||
|
|
"name": "scope",
|
||
|
|
"type": "role_scope",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"isEditable": {
|
||
|
|
"name": "isEditable",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"isSystem": {
|
||
|
|
"name": "isSystem",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"basedOnRoleId": {
|
||
|
|
"name": "basedOnRoleId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"roles_tenantId_tenants_id_fk": {
|
||
|
|
"name": "roles_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "roles",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.user_role_assignments": {
|
||
|
|
"name": "user_role_assignments",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"assignmentId": {
|
||
|
|
"name": "assignmentId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"userId": {
|
||
|
|
"name": "userId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"roleId": {
|
||
|
|
"name": "roleId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"validFrom": {
|
||
|
|
"name": "validFrom",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"validTo": {
|
||
|
|
"name": "validTo",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"user_role_assignments_tenant_user_role_unique": {
|
||
|
|
"name": "user_role_assignments_tenant_user_role_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "tenantId",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "userId",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "roleId",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"user_role_assignments_tenantId_tenants_id_fk": {
|
||
|
|
"name": "user_role_assignments_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "user_role_assignments",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"user_role_assignments_userId_user_id_fk": {
|
||
|
|
"name": "user_role_assignments_userId_user_id_fk",
|
||
|
|
"tableFrom": "user_role_assignments",
|
||
|
|
"tableTo": "user",
|
||
|
|
"columnsFrom": [
|
||
|
|
"userId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"user_role_assignments_roleId_roles_roleId_fk": {
|
||
|
|
"name": "user_role_assignments_roleId_roles_roleId_fk",
|
||
|
|
"tableFrom": "user_role_assignments",
|
||
|
|
"tableTo": "roles",
|
||
|
|
"columnsFrom": [
|
||
|
|
"roleId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"roleId"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.tenant_pages": {
|
||
|
|
"name": "tenant_pages",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"slug": {
|
||
|
|
"name": "slug",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"parentPageId": {
|
||
|
|
"name": "parentPageId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sortOrder": {
|
||
|
|
"name": "sortOrder",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"content": {
|
||
|
|
"name": "content",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"lifecycleStatus": {
|
||
|
|
"name": "lifecycleStatus",
|
||
|
|
"type": "news_lifecycle_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'draft'"
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "news_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'draft'"
|
||
|
|
},
|
||
|
|
"visibility": {
|
||
|
|
"name": "visibility",
|
||
|
|
"type": "visibility",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'public'"
|
||
|
|
},
|
||
|
|
"publishedAt": {
|
||
|
|
"name": "publishedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"archivedAt": {
|
||
|
|
"name": "archivedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"tenant_pages_tenant_slug_unique": {
|
||
|
|
"name": "tenant_pages_tenant_slug_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "tenantId",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "slug",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"tenant_pages_tenantId_tenants_id_fk": {
|
||
|
|
"name": "tenant_pages_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "tenant_pages",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.tenant_navigation_items": {
|
||
|
|
"name": "tenant_navigation_items",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"area": {
|
||
|
|
"name": "area",
|
||
|
|
"type": "navigation_area",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"pageId": {
|
||
|
|
"name": "pageId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"label": {
|
||
|
|
"name": "label",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sortOrder": {
|
||
|
|
"name": "sortOrder",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"tenant_navigation_items_tenantId_tenants_id_fk": {
|
||
|
|
"name": "tenant_navigation_items_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "tenant_navigation_items",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"tenant_navigation_items_pageId_tenant_pages_id_fk": {
|
||
|
|
"name": "tenant_navigation_items_pageId_tenant_pages_id_fk",
|
||
|
|
"tableFrom": "tenant_navigation_items",
|
||
|
|
"tableTo": "tenant_pages",
|
||
|
|
"columnsFrom": [
|
||
|
|
"pageId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.tenant_domains": {
|
||
|
|
"name": "tenant_domains",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"hostname": {
|
||
|
|
"name": "hostname",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"type": {
|
||
|
|
"name": "type",
|
||
|
|
"type": "tenant_domain_type",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"verificationStatus": {
|
||
|
|
"name": "verificationStatus",
|
||
|
|
"type": "domain_verification_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'pending'"
|
||
|
|
},
|
||
|
|
"verificationToken": {
|
||
|
|
"name": "verificationToken",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"verificationCheckedAt": {
|
||
|
|
"name": "verificationCheckedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"verifiedAt": {
|
||
|
|
"name": "verifiedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"tenant_domains_hostname_unique": {
|
||
|
|
"name": "tenant_domains_hostname_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "hostname",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"tenant_domains_tenantId_tenants_id_fk": {
|
||
|
|
"name": "tenant_domains_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "tenant_domains",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.tenant_members": {
|
||
|
|
"name": "tenant_members",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"tenantId": {
|
||
|
|
"name": "tenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"userId": {
|
||
|
|
"name": "userId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"role": {
|
||
|
|
"name": "role",
|
||
|
|
"type": "tenant_member_role",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'member'"
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {
|
||
|
|
"tenant_members_tenantId_tenants_id_fk": {
|
||
|
|
"name": "tenant_members_tenantId_tenants_id_fk",
|
||
|
|
"tableFrom": "tenant_members",
|
||
|
|
"tableTo": "tenants",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tenantId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"tenant_members_userId_user_id_fk": {
|
||
|
|
"name": "tenant_members_userId_user_id_fk",
|
||
|
|
"tableFrom": "tenant_members",
|
||
|
|
"tableTo": "user",
|
||
|
|
"columnsFrom": [
|
||
|
|
"userId"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {
|
||
|
|
"tenant_members_tenantId_userId_pk": {
|
||
|
|
"name": "tenant_members_tenantId_userId_pk",
|
||
|
|
"columns": [
|
||
|
|
"tenantId",
|
||
|
|
"userId"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.tenants": {
|
||
|
|
"name": "tenants",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"parentTenantId": {
|
||
|
|
"name": "parentTenantId",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"slug": {
|
||
|
|
"name": "slug",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "tenant_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'active'"
|
||
|
|
},
|
||
|
|
"createdAt": {
|
||
|
|
"name": "createdAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updatedAt": {
|
||
|
|
"name": "updatedAt",
|
||
|
|
"type": "timestamp",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"tenants_slug_unique": {
|
||
|
|
"name": "tenants_slug_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"slug"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"enums": {
|
||
|
|
"public.booking_status": {
|
||
|
|
"name": "booking_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"pending",
|
||
|
|
"confirmed",
|
||
|
|
"rejected"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.domain_verification_status": {
|
||
|
|
"name": "domain_verification_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"pending",
|
||
|
|
"verified",
|
||
|
|
"failed"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.navigation_area": {
|
||
|
|
"name": "navigation_area",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"main",
|
||
|
|
"footer_1",
|
||
|
|
"footer_2",
|
||
|
|
"footer_3",
|
||
|
|
"footer_4"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.news_lifecycle_status": {
|
||
|
|
"name": "news_lifecycle_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"draft",
|
||
|
|
"scheduled",
|
||
|
|
"published",
|
||
|
|
"archived"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.news_source": {
|
||
|
|
"name": "news_source",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"native",
|
||
|
|
"imported"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.news_status": {
|
||
|
|
"name": "news_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"draft",
|
||
|
|
"published"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.role_scope": {
|
||
|
|
"name": "role_scope",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"platform",
|
||
|
|
"tenant"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.tenant_domain_type": {
|
||
|
|
"name": "tenant_domain_type",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"subdomain",
|
||
|
|
"custom"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.tenant_member_role": {
|
||
|
|
"name": "tenant_member_role",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"admin",
|
||
|
|
"tenant_admin",
|
||
|
|
"editor",
|
||
|
|
"haus_admin",
|
||
|
|
"member_manager",
|
||
|
|
"member",
|
||
|
|
"verband_admin",
|
||
|
|
"landes_admin"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.tenant_status": {
|
||
|
|
"name": "tenant_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"active",
|
||
|
|
"disabled"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.user_role": {
|
||
|
|
"name": "user_role",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"admin",
|
||
|
|
"redaktion",
|
||
|
|
"gruppenleitung",
|
||
|
|
"hausverwaltung"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.visibility": {
|
||
|
|
"name": "visibility",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"public",
|
||
|
|
"members"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"schemas": {},
|
||
|
|
"sequences": {},
|
||
|
|
"roles": {},
|
||
|
|
"policies": {},
|
||
|
|
"views": {},
|
||
|
|
"_meta": {
|
||
|
|
"columns": {},
|
||
|
|
"schemas": {},
|
||
|
|
"tables": {}
|
||
|
|
}
|
||
|
|
}
|