- Add canvas project and node database tables - Create canvas workspace with drag, resize, zoom and pan - Add ImageNode with background removal, enhance, extend, angle edit, scene fusion - Add VideoNode with playback controls - Add TextNode for text editing - Integrate AI image generation API (Gemini/Alibaba) - Implement viewport culling for performance optimization - Add canvas entry in top navigation bar
1749 lines
43 KiB
JSON
1749 lines
43 KiB
JSON
{
|
|
"id": "68a38230-ad03-47b2-99d8-fdb751224301",
|
|
"prevId": "765b10fa-cba0-4dcd-988a-62f292d05d67",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.AiModel": {
|
|
"name": "AiModel",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"providerId": {
|
|
"name": "providerId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"modelId": {
|
|
"name": "modelId",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"displayName": {
|
|
"name": "displayName",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"supportsVision": {
|
|
"name": "supportsVision",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"supportsImageGen": {
|
|
"name": "supportsImageGen",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"isEnabled": {
|
|
"name": "isEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"isDefault": {
|
|
"name": "isDefault",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"sortOrder": {
|
|
"name": "sortOrder",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"capabilities": {
|
|
"name": "capabilities",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"defaultParams": {
|
|
"name": "defaultParams",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_sub_model": {
|
|
"name": "is_sub_model",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"parent_model_id": {
|
|
"name": "parent_model_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"fallbackModelId1": {
|
|
"name": "fallbackModelId1",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"fallbackModelId2": {
|
|
"name": "fallbackModelId2",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"imageGenConfig": {
|
|
"name": "imageGenConfig",
|
|
"type": "jsonb",
|
|
"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": {
|
|
"AiModel_providerId_AiProvider_id_fk": {
|
|
"name": "AiModel_providerId_AiProvider_id_fk",
|
|
"tableFrom": "AiModel",
|
|
"tableTo": "AiProvider",
|
|
"columnsFrom": [
|
|
"providerId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.AiProvider": {
|
|
"name": "AiProvider",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'custom'"
|
|
},
|
|
"baseUrl": {
|
|
"name": "baseUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"apiKey": {
|
|
"name": "apiKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"isEnabled": {
|
|
"name": "isEnabled",
|
|
"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()"
|
|
},
|
|
"updatedBy": {
|
|
"name": "updatedBy",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"AiProvider_updatedBy_User_id_fk": {
|
|
"name": "AiProvider_updatedBy_User_id_fk",
|
|
"tableFrom": "AiProvider",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"updatedBy"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.AuthSettings": {
|
|
"name": "AuthSettings",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"dingTalkAppKey": {
|
|
"name": "dingTalkAppKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"dingTalkAppSecret": {
|
|
"name": "dingTalkAppSecret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"dingTalkOrganizations": {
|
|
"name": "dingTalkOrganizations",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"isDingTalkEnabled": {
|
|
"name": "isDingTalkEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"isRegistrationEnabled": {
|
|
"name": "isRegistrationEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedBy": {
|
|
"name": "updatedBy",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"AuthSettings_updatedBy_User_id_fk": {
|
|
"name": "AuthSettings_updatedBy_User_id_fk",
|
|
"tableFrom": "AuthSettings",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"updatedBy"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.CanvasNode": {
|
|
"name": "CanvasNode",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"projectId": {
|
|
"name": "projectId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"position": {
|
|
"name": "position",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"size": {
|
|
"name": "size",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"data": {
|
|
"name": "data",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"connections": {
|
|
"name": "connections",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'[]'::jsonb"
|
|
},
|
|
"parentId": {
|
|
"name": "parentId",
|
|
"type": "uuid",
|
|
"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": {
|
|
"CanvasNode_projectId_CanvasProject_id_fk": {
|
|
"name": "CanvasNode_projectId_CanvasProject_id_fk",
|
|
"tableFrom": "CanvasNode",
|
|
"tableTo": "CanvasProject",
|
|
"columnsFrom": [
|
|
"projectId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.CanvasProject": {
|
|
"name": "CanvasProject",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(256)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'未命名画布'"
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"thumbnail": {
|
|
"name": "thumbnail",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"canvasData": {
|
|
"name": "canvasData",
|
|
"type": "jsonb",
|
|
"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": {
|
|
"CanvasProject_userId_User_id_fk": {
|
|
"name": "CanvasProject_userId_User_id_fk",
|
|
"tableFrom": "CanvasProject",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.Chat": {
|
|
"name": "Chat",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"visibility": {
|
|
"name": "visibility",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'private'"
|
|
},
|
|
"lastContext": {
|
|
"name": "lastContext",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"Chat_userId_User_id_fk": {
|
|
"name": "Chat_userId_User_id_fk",
|
|
"tableFrom": "Chat",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.Document": {
|
|
"name": "Document",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"content": {
|
|
"name": "content",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"text": {
|
|
"name": "text",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'text'"
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"Document_userId_User_id_fk": {
|
|
"name": "Document_userId_User_id_fk",
|
|
"tableFrom": "Document",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"Document_id_createdAt_pk": {
|
|
"name": "Document_id_createdAt_pk",
|
|
"columns": [
|
|
"id",
|
|
"createdAt"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.GeneratedImage": {
|
|
"name": "GeneratedImage",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"chatId": {
|
|
"name": "chatId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"messageId": {
|
|
"name": "messageId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"thumbnailUrl": {
|
|
"name": "thumbnailUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"originalUrl": {
|
|
"name": "originalUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"imageSize": {
|
|
"name": "imageSize",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'2K'"
|
|
},
|
|
"prompt": {
|
|
"name": "prompt",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"modelId": {
|
|
"name": "modelId",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"isFeatured": {
|
|
"name": "isFeatured",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"featuredAt": {
|
|
"name": "featuredAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"featuredBy": {
|
|
"name": "featuredBy",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"GeneratedImage_userId_User_id_fk": {
|
|
"name": "GeneratedImage_userId_User_id_fk",
|
|
"tableFrom": "GeneratedImage",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"GeneratedImage_chatId_Chat_id_fk": {
|
|
"name": "GeneratedImage_chatId_Chat_id_fk",
|
|
"tableFrom": "GeneratedImage",
|
|
"tableTo": "Chat",
|
|
"columnsFrom": [
|
|
"chatId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"GeneratedImage_featuredBy_User_id_fk": {
|
|
"name": "GeneratedImage_featuredBy_User_id_fk",
|
|
"tableFrom": "GeneratedImage",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"featuredBy"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.LoginToken": {
|
|
"name": "LoginToken",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expiresAt": {
|
|
"name": "expiresAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"LoginToken_token_unique": {
|
|
"name": "LoginToken_token_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"public.Message_v2": {
|
|
"name": "Message_v2",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"chatId": {
|
|
"name": "chatId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"parts": {
|
|
"name": "parts",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"attachments": {
|
|
"name": "attachments",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"video_storage_status": {
|
|
"name": "video_storage_status",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'temporary'"
|
|
},
|
|
"temporary_video_url": {
|
|
"name": "temporary_video_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"permanent_video_url": {
|
|
"name": "permanent_video_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"archived_at": {
|
|
"name": "archived_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"video_metadata": {
|
|
"name": "video_metadata",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"Message_v2_chatId_Chat_id_fk": {
|
|
"name": "Message_v2_chatId_Chat_id_fk",
|
|
"tableFrom": "Message_v2",
|
|
"tableTo": "Chat",
|
|
"columnsFrom": [
|
|
"chatId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.Message": {
|
|
"name": "Message",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"chatId": {
|
|
"name": "chatId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"content": {
|
|
"name": "content",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"Message_chatId_Chat_id_fk": {
|
|
"name": "Message_chatId_Chat_id_fk",
|
|
"tableFrom": "Message",
|
|
"tableTo": "Chat",
|
|
"columnsFrom": [
|
|
"chatId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.NavLinks": {
|
|
"name": "NavLinks",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"url": {
|
|
"name": "url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"order": {
|
|
"name": "order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"isEnabled": {
|
|
"name": "isEnabled",
|
|
"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()"
|
|
},
|
|
"createdBy": {
|
|
"name": "createdBy",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"NavLinks_createdBy_User_id_fk": {
|
|
"name": "NavLinks_createdBy_User_id_fk",
|
|
"tableFrom": "NavLinks",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"createdBy"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.SiteSettings": {
|
|
"name": "SiteSettings",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"siteName": {
|
|
"name": "siteName",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'AI Chatbot'"
|
|
},
|
|
"siteLogo": {
|
|
"name": "siteLogo",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"siteLogoDark": {
|
|
"name": "siteLogoDark",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"favicon": {
|
|
"name": "favicon",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"showAutoModel": {
|
|
"name": "showAutoModel",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"defaultTheme": {
|
|
"name": "defaultTheme",
|
|
"type": "varchar(16)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'system'"
|
|
},
|
|
"usageTimeEnabled": {
|
|
"name": "usageTimeEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"usageTimeStart": {
|
|
"name": "usageTimeStart",
|
|
"type": "varchar(5)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'08:00'"
|
|
},
|
|
"usageTimeEnd": {
|
|
"name": "usageTimeEnd",
|
|
"type": "varchar(5)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'20:00'"
|
|
},
|
|
"usageTimeMessage": {
|
|
"name": "usageTimeMessage",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'由壹点累了也是需要休息的'"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedBy": {
|
|
"name": "updatedBy",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"SiteSettings_updatedBy_User_id_fk": {
|
|
"name": "SiteSettings_updatedBy_User_id_fk",
|
|
"tableFrom": "SiteSettings",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"updatedBy"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.StorageConfig": {
|
|
"name": "StorageConfig",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'s3'"
|
|
},
|
|
"endpoint": {
|
|
"name": "endpoint",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"region": {
|
|
"name": "region",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"bucket": {
|
|
"name": "bucket",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"accessKeyId": {
|
|
"name": "accessKeyId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"secretAccessKey": {
|
|
"name": "secretAccessKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"publicUrl": {
|
|
"name": "publicUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"isDefault": {
|
|
"name": "isDefault",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"isEnabled": {
|
|
"name": "isEnabled",
|
|
"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()"
|
|
},
|
|
"updatedBy": {
|
|
"name": "updatedBy",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"StorageConfig_updatedBy_User_id_fk": {
|
|
"name": "StorageConfig_updatedBy_User_id_fk",
|
|
"tableFrom": "StorageConfig",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"updatedBy"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.Stream": {
|
|
"name": "Stream",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"chatId": {
|
|
"name": "chatId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"Stream_chatId_Chat_id_fk": {
|
|
"name": "Stream_chatId_Chat_id_fk",
|
|
"tableFrom": "Stream",
|
|
"tableTo": "Chat",
|
|
"columnsFrom": [
|
|
"chatId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"Stream_id_pk": {
|
|
"name": "Stream_id_pk",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.Suggestion": {
|
|
"name": "Suggestion",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"documentId": {
|
|
"name": "documentId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"documentCreatedAt": {
|
|
"name": "documentCreatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"originalText": {
|
|
"name": "originalText",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"suggestedText": {
|
|
"name": "suggestedText",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"isResolved": {
|
|
"name": "isResolved",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"Suggestion_userId_User_id_fk": {
|
|
"name": "Suggestion_userId_User_id_fk",
|
|
"tableFrom": "Suggestion",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"Suggestion_documentId_documentCreatedAt_Document_id_createdAt_fk": {
|
|
"name": "Suggestion_documentId_documentCreatedAt_Document_id_createdAt_fk",
|
|
"tableFrom": "Suggestion",
|
|
"tableTo": "Document",
|
|
"columnsFrom": [
|
|
"documentId",
|
|
"documentCreatedAt"
|
|
],
|
|
"columnsTo": [
|
|
"id",
|
|
"createdAt"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"Suggestion_id_pk": {
|
|
"name": "Suggestion_id_pk",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.SystemSettings": {
|
|
"name": "SystemSettings",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedBy": {
|
|
"name": "updatedBy",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"SystemSettings_updatedBy_User_id_fk": {
|
|
"name": "SystemSettings_updatedBy_User_id_fk",
|
|
"tableFrom": "SystemSettings",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"updatedBy"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"SystemSettings_key_unique": {
|
|
"name": "SystemSettings_key_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"key"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"public.ToolConfig": {
|
|
"name": "ToolConfig",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"toolName": {
|
|
"name": "toolName",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"isEnabled": {
|
|
"name": "isEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"config": {
|
|
"name": "config",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedBy": {
|
|
"name": "updatedBy",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"ToolConfig_updatedBy_User_id_fk": {
|
|
"name": "ToolConfig_updatedBy_User_id_fk",
|
|
"tableFrom": "ToolConfig",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"updatedBy"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"ToolConfig_toolName_unique": {
|
|
"name": "ToolConfig_toolName_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"toolName"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"public.User": {
|
|
"name": "User",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"department": {
|
|
"name": "department",
|
|
"type": "varchar(256)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"dingtalkUserId": {
|
|
"name": "dingtalkUserId",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'regular'"
|
|
},
|
|
"isActive": {
|
|
"name": "isActive",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"monthlyImageLimit": {
|
|
"name": "monthlyImageLimit",
|
|
"type": "integer",
|
|
"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": {}
|
|
},
|
|
"public.Vote_v2": {
|
|
"name": "Vote_v2",
|
|
"schema": "",
|
|
"columns": {
|
|
"chatId": {
|
|
"name": "chatId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"messageId": {
|
|
"name": "messageId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"isUpvoted": {
|
|
"name": "isUpvoted",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"Vote_v2_chatId_Chat_id_fk": {
|
|
"name": "Vote_v2_chatId_Chat_id_fk",
|
|
"tableFrom": "Vote_v2",
|
|
"tableTo": "Chat",
|
|
"columnsFrom": [
|
|
"chatId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"Vote_v2_messageId_Message_v2_id_fk": {
|
|
"name": "Vote_v2_messageId_Message_v2_id_fk",
|
|
"tableFrom": "Vote_v2",
|
|
"tableTo": "Message_v2",
|
|
"columnsFrom": [
|
|
"messageId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"Vote_v2_chatId_messageId_pk": {
|
|
"name": "Vote_v2_chatId_messageId_pk",
|
|
"columns": [
|
|
"chatId",
|
|
"messageId"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {}
|
|
},
|
|
"public.Vote": {
|
|
"name": "Vote",
|
|
"schema": "",
|
|
"columns": {
|
|
"chatId": {
|
|
"name": "chatId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"messageId": {
|
|
"name": "messageId",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"isUpvoted": {
|
|
"name": "isUpvoted",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"Vote_chatId_Chat_id_fk": {
|
|
"name": "Vote_chatId_Chat_id_fk",
|
|
"tableFrom": "Vote",
|
|
"tableTo": "Chat",
|
|
"columnsFrom": [
|
|
"chatId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"Vote_messageId_Message_id_fk": {
|
|
"name": "Vote_messageId_Message_id_fk",
|
|
"tableFrom": "Vote",
|
|
"tableTo": "Message",
|
|
"columnsFrom": [
|
|
"messageId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"Vote_chatId_messageId_pk": {
|
|
"name": "Vote_chatId_messageId_pk",
|
|
"columns": [
|
|
"chatId",
|
|
"messageId"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {}
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |