Ver Fonte

feat: prisma

Carson há 3 meses atrás
pai
commit
291eb43493

+ 7 - 0
.env.example

@@ -0,0 +1,7 @@
+# Environment variables declared in this file are automatically made available to Prisma.
+# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
+
+# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
+# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
+
+DATABASE_URL=mysql://root:example@host:3306/db

+ 1 - 0
.gitignore

@@ -27,6 +27,7 @@ yarn-error.log*
 
 # local env files
 .env*.local
+.env
 
 # vercel
 .vercel

+ 0 - 1
app/run-agent-flow/components/Header.tsx

@@ -21,7 +21,6 @@ export default function Header() {
   const logIn = async () => {
     const loginUsername = orgQuery.data?.mail ? `${username}@${orgQuery.data?.mail}` : `${username}@cocorobo.cc`
     const loginPassword = btoa(password)
-    // const res = await signIn('credentials', { redirect: false, loginUsername: 'lanlinling@szjky.com', loginPassword: 'MTIzNDU2' })
     const res = await signIn('credentials', { redirect: false, loginUsername, loginPassword })
     console.log(res)
     if (!res.ok) {

+ 4 - 1
app/run-agent-flow/components/NodeRender.tsx

@@ -2,14 +2,17 @@
 
 import React, { useMemo } from 'react'
 import { BsArrowLeft, BsArrowRight } from "react-icons/bs";
+import Agent from './NodeType/Agent';
 import Form from './NodeType/Form';
+import Unsupport from './NodeType/Unsupport';
 import * as R from 'ramda'
 
 const NodeRender = ({ node }) => {
   const Comp = useMemo(() => {
     return R.cond([
       [R.propEq('form_card', 'type'), R.always(Form)],
-      [R.T, R.always('div')],
+      [R.propEq('UserTask', 'type'), R.always(Agent)],
+      [R.T, R.always(Unsupport)],
     ])(node)
   }, [node?.id])
   return (

+ 7 - 0
app/run-agent-flow/components/NodeType/Agent.tsx

@@ -0,0 +1,7 @@
+import React from 'react'
+const Agent = ({node}) => {
+  return (
+    <div className="">agent card {JSON.stringify(node)}</div>
+  )
+}
+export default React.memo(Agent)

+ 7 - 0
app/run-agent-flow/components/NodeType/Unsupport.tsx

@@ -0,0 +1,7 @@
+import React from 'react'
+const Unsupport = ({node}) => {
+  return (
+    <div className="">form card {JSON.stringify(node)}</div>
+  )
+}
+export default React.memo(Unsupport)

+ 15 - 0
lib/db.ts

@@ -0,0 +1,15 @@
+import { PrismaClient } from '@prisma/client'
+
+declare const global: { prisma: PrismaClient }
+let prisma: PrismaClient
+
+if (process.env.NODE_ENV === 'production') {
+  prisma = new PrismaClient()
+} else {
+  if (!global.prisma) {
+    global.prisma = new PrismaClient()
+  }
+  prisma = global.prisma
+}
+
+export default prisma

+ 80 - 0
package-lock.json

@@ -8,6 +8,7 @@
       "name": "coco-app-platform",
       "version": "0.1.0",
       "dependencies": {
+        "@prisma/client": "^5.18.0",
         "@tanstack/react-query": "^5.52.0",
         "@trpc/client": "^11.0.0-rc.482",
         "@trpc/react-query": "^11.0.0-rc.482",
@@ -34,6 +35,7 @@
         "eslint": "^8",
         "eslint-config-next": "14.2.5",
         "postcss": "^8",
+        "prisma": "^5.18.0",
         "tailwindcss": "^3.4.1",
         "typescript": "^5"
       }
@@ -445,6 +447,68 @@
         "node": ">=14"
       }
     },
+    "node_modules/@prisma/client": {
+      "version": "5.18.0",
+      "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.18.0.tgz",
+      "integrity": "sha512-BWivkLh+af1kqC89zCJYkHsRcyWsM8/JHpsDMM76DjP3ZdEquJhXa4IeX+HkWPnwJ5FanxEJFZZDTWiDs/Kvyw==",
+      "hasInstallScript": true,
+      "engines": {
+        "node": ">=16.13"
+      },
+      "peerDependencies": {
+        "prisma": "*"
+      },
+      "peerDependenciesMeta": {
+        "prisma": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@prisma/debug": {
+      "version": "5.18.0",
+      "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.18.0.tgz",
+      "integrity": "sha512-f+ZvpTLidSo3LMJxQPVgAxdAjzv5OpzAo/eF8qZqbwvgi2F5cTOI9XCpdRzJYA0iGfajjwjOKKrVq64vkxEfUw==",
+      "devOptional": true
+    },
+    "node_modules/@prisma/engines": {
+      "version": "5.18.0",
+      "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.18.0.tgz",
+      "integrity": "sha512-ofmpGLeJ2q2P0wa/XaEgTnX/IsLnvSp/gZts0zjgLNdBhfuj2lowOOPmDcfKljLQUXMvAek3lw5T01kHmCG8rg==",
+      "devOptional": true,
+      "hasInstallScript": true,
+      "dependencies": {
+        "@prisma/debug": "5.18.0",
+        "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",
+        "@prisma/fetch-engine": "5.18.0",
+        "@prisma/get-platform": "5.18.0"
+      }
+    },
+    "node_modules/@prisma/engines-version": {
+      "version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",
+      "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169.tgz",
+      "integrity": "sha512-a/+LpJj8vYU3nmtkg+N3X51ddbt35yYrRe8wqHTJtYQt7l1f8kjIBcCs6sHJvodW/EK5XGvboOiwm47fmNrbgg==",
+      "devOptional": true
+    },
+    "node_modules/@prisma/fetch-engine": {
+      "version": "5.18.0",
+      "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.18.0.tgz",
+      "integrity": "sha512-I/3u0x2n31rGaAuBRx2YK4eB7R/1zCuayo2DGwSpGyrJWsZesrV7QVw7ND0/Suxeo/vLkJ5OwuBqHoCxvTHpOg==",
+      "devOptional": true,
+      "dependencies": {
+        "@prisma/debug": "5.18.0",
+        "@prisma/engines-version": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",
+        "@prisma/get-platform": "5.18.0"
+      }
+    },
+    "node_modules/@prisma/get-platform": {
+      "version": "5.18.0",
+      "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.18.0.tgz",
+      "integrity": "sha512-Tk+m7+uhqcKDgnMnFN0lRiH7Ewea0OEsZZs9pqXa7i3+7svS3FSCqDBCaM9x5fmhhkufiG0BtunJVDka+46DlA==",
+      "devOptional": true,
+      "dependencies": {
+        "@prisma/debug": "5.18.0"
+      }
+    },
     "node_modules/@rushstack/eslint-patch": {
       "version": "1.10.4",
       "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.4.tgz",
@@ -4105,6 +4169,22 @@
       "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz",
       "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew=="
     },
+    "node_modules/prisma": {
+      "version": "5.18.0",
+      "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.18.0.tgz",
+      "integrity": "sha512-+TrSIxZsh64OPOmaSgVPH7ALL9dfU0jceYaMJXsNrTkFHO7/3RANi5K2ZiPB1De9+KDxCWn7jvRq8y8pvk+o9g==",
+      "devOptional": true,
+      "hasInstallScript": true,
+      "dependencies": {
+        "@prisma/engines": "5.18.0"
+      },
+      "bin": {
+        "prisma": "build/index.js"
+      },
+      "engines": {
+        "node": ">=16.13"
+      }
+    },
     "node_modules/prop-types": {
       "version": "15.8.1",
       "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",

+ 2 - 0
package.json

@@ -9,6 +9,7 @@
     "lint": "next lint"
   },
   "dependencies": {
+    "@prisma/client": "^5.18.0",
     "@tanstack/react-query": "^5.52.0",
     "@trpc/client": "^11.0.0-rc.482",
     "@trpc/react-query": "^11.0.0-rc.482",
@@ -35,6 +36,7 @@
     "eslint": "^8",
     "eslint-config-next": "14.2.5",
     "postcss": "^8",
+    "prisma": "^5.18.0",
     "tailwindcss": "^3.4.1",
     "typescript": "^5"
   }

+ 292 - 0
prisma/migrations/0_init/migration.sql

@@ -0,0 +1,292 @@
+-- CreateTable
+CREATE TABLE `AWS_Policy_Role` (
+    `id` VARCHAR(36) NOT NULL,
+    `assistant_id` VARCHAR(36) NULL,
+    `agent_bedrock_policy` LONGTEXT NULL,
+    `agent_kb_schema_policy` LONGTEXT NULL,
+    `kb_bedrock_policy` LONGTEXT NULL,
+    `kb_aoss_policy` LONGTEXT NULL,
+    `kb_s3_policy` LONGTEXT NULL,
+    `agent_role_name` TEXT NULL,
+    `kb_role_name` TEXT NULL,
+    `createtime` DATETIME(0) NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `Ai_Agent_Assistants` (
+    `id` VARCHAR(36) NOT NULL,
+    `userId` VARCHAR(255) NULL,
+    `username` VARCHAR(255) NULL,
+    `agent_sort` VARCHAR(255) NULL,
+    `agent_tag` VARCHAR(255) NULL,
+    `assistantName` VARCHAR(255) NULL,
+    `description` LONGTEXT NULL,
+    `prologue` LONGTEXT NULL,
+    `headUrl` LONGTEXT NULL,
+    `instructions` LONGTEXT NULL,
+    `isRetrieval` BOOLEAN NULL,
+    `isCode` BOOLEAN NULL,
+    `isGoogle` BOOLEAN NULL,
+    `isDalleImage` BOOLEAN NULL,
+    `functionNames` LONGTEXT NULL,
+    `functionContents` LONGTEXT NULL,
+    `assistant_id` TEXT NULL,
+    `thread_id` TEXT NULL,
+    `file_ids` LONGTEXT NULL,
+    `file_names` LONGTEXT NULL,
+    `isPublish` BOOLEAN NULL,
+    `organize_id` LONGTEXT NULL,
+    `vector_store_id` TEXT NULL,
+    `modelType` VARCHAR(255) NULL,
+    `createtime` DATETIME(0) NULL,
+    `updatetime` DATETIME(0) NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `Ai_Agent_Threads` (
+    `id` VARCHAR(36) NOT NULL,
+    `userId` VARCHAR(255) NULL,
+    `assistant_id` TEXT NULL,
+    `thread_id` TEXT NULL,
+    `createtime` DATETIME(0) NULL,
+    `session_name` VARCHAR(255) NOT NULL DEFAULT '',
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `Assistant` (
+    `id` VARCHAR(36) NOT NULL,
+    `uid` VARCHAR(36) NULL,
+    `assistant_id` TEXT NULL,
+    `thread_id` TEXT NULL,
+    `file_ids` TEXT NULL,
+    `vector_store_id` TEXT NULL,
+    `createtime` DATETIME(0) NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `Chat` (
+    `id` VARCHAR(36) NOT NULL DEFAULT '',
+    `groupid` VARCHAR(36) NULL,
+    `userid` VARCHAR(36) NULL,
+    `username` VARCHAR(255) NULL,
+    `answer` TEXT NULL,
+    `problem` LONGTEXT NULL,
+    `createtime` DATETIME(0) NULL,
+    `fileid` VARCHAR(36) NULL,
+    `isMindMap` INTEGER NULL,
+    `filename` VARCHAR(255) NULL,
+    `session_name` VARCHAR(255) NOT NULL DEFAULT '',
+    `scene` VARCHAR(255) NULL,
+
+    INDEX `createtime`(`createtime`),
+    INDEX `fileid`(`fileid`),
+    INDEX `groupid`(`groupid`),
+    INDEX `userid`(`userid`),
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `Disposition` (
+    `id` VARCHAR(36) NOT NULL,
+    `module` VARCHAR(255) NULL,
+    `disposition_class` VARCHAR(255) NULL,
+    `disposition_type` VARCHAR(255) NULL,
+    `disposition_style` VARCHAR(255) NULL,
+    `disposition_theme` VARCHAR(255) NULL,
+    `user_id` VARCHAR(36) NULL,
+    `create_time` DATETIME(0) NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `Group` (
+    `id` VARCHAR(36) NOT NULL,
+    `name` VARCHAR(255) NULL,
+    `userid` VARCHAR(36) NULL,
+    `createtime` DATETIME(0) NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `GroupFile` (
+    `id` VARCHAR(36) NOT NULL,
+    `userid` VARCHAR(36) NULL,
+    `fileurl` TEXT NULL,
+    `filename` TEXT NULL,
+    `groupid` VARCHAR(36) NULL,
+    `abstract` TEXT NULL,
+    `assistantFileId` VARCHAR(36) NULL,
+    `modelType` VARCHAR(36) NULL,
+    `createtime` DATETIME(0) NULL,
+
+    INDEX `createtime`(`createtime`),
+    INDEX `groupid`(`groupid`),
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `InvitationCode` (
+    `id` VARCHAR(36) NOT NULL,
+    `cid` VARCHAR(36) NULL,
+    `themeId` VARCHAR(36) NULL,
+    `type` INTEGER NULL,
+    `invitationCode` VARCHAR(36) NULL,
+    `createtime` DATETIME(0) NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `ai_agent_park_session` (
+    `id` VARCHAR(36) NOT NULL,
+    `session_name` VARCHAR(255) NULL,
+    `user_id` VARCHAR(255) NULL,
+    `isCocoNote` TINYINT NULL,
+    `createtime` DATETIME(0) NULL,
+    `work_area_text` LONGTEXT NULL,
+    `scene` VARCHAR(255) NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `classroom_ob_comment` (
+    `id` VARCHAR(255) NOT NULL,
+    `module_id` VARCHAR(255) NOT NULL,
+    `module_name` VARCHAR(255) NULL,
+    `nickname` VARCHAR(255) NULL,
+    `commentContent` LONGTEXT NULL,
+    `audit_status` INTEGER NOT NULL DEFAULT 0,
+    `t_id` VARCHAR(36) NULL,
+    `create_time` DATETIME(0) NULL,
+
+    INDEX `tid_status`(`audit_status`, `t_id`),
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `classroom_observation` (
+    `id` VARCHAR(36) NOT NULL,
+    `jsonData` LONGTEXT NULL,
+    `Type` INTEGER NULL,
+    `tIndex` INTEGER NULL,
+    `tId` VARCHAR(36) NULL,
+    `createtime` DATETIME(0) NULL,
+    `like_num` INTEGER NOT NULL DEFAULT 0,
+    `like_data` LONGTEXT NULL,
+    `userid` VARCHAR(255) NULL,
+    `isdel` INTEGER NULL DEFAULT 0,
+    `limitData` LONGTEXT NULL,
+
+    INDEX `Type`(`Type`),
+    INDEX `createtime`(`createtime`),
+    INDEX `tIndex`(`tIndex`),
+    INDEX `type_tid`(`Type`, `tId`),
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `course_resource` (
+    `id` VARCHAR(36) NOT NULL,
+    `subject` VARCHAR(255) NULL,
+    `grade` VARCHAR(255) NULL,
+    `textbook` VARCHAR(255) NULL,
+    `book_type` VARCHAR(255) NULL,
+    `unit` VARCHAR(255) NULL,
+    `period` VARCHAR(255) NULL,
+    `unit_content` LONGTEXT NULL,
+    `course_content` LONGTEXT NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `knowledge_construction_doc` (
+    `id` VARCHAR(255) NOT NULL,
+    `muti_id` VARCHAR(255) NULL,
+    `user_id` VARCHAR(255) NULL,
+    `session_id` VARCHAR(255) NULL,
+    `content` LONGTEXT NULL,
+    `create_time` DATETIME(0) NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `meeting_trick` (
+    `id` VARCHAR(36) NOT NULL,
+    `createtime` DATETIME(0) NULL,
+    `userid` VARCHAR(255) NULL,
+    `meeting_name` VARCHAR(255) NULL,
+    `meeting_original` LONGTEXT NULL,
+    `meeting_minutes` LONGTEXT NULL,
+    `audio_url` VARCHAR(255) NULL,
+    `duration` VARCHAR(255) NULL,
+    `ab` LONGTEXT NULL,
+
+    INDEX `get_meeting_trick`(`userid`),
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `meeting_trick_chat` (
+    `id` VARCHAR(36) NOT NULL,
+    `meeting_id` VARCHAR(36) NULL,
+    `createtime` DATETIME(0) NULL,
+    `user_content` TEXT NULL,
+    `ai_content` TEXT NULL,
+
+    INDEX `get_meeting_trick_chat`(`meeting_id`),
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `muti_agent_list` (
+    `id` VARCHAR(255) NOT NULL,
+    `userid` VARCHAR(255) NULL,
+    `username` VARCHAR(255) NULL,
+    `muti_name` VARCHAR(255) NULL,
+    `description` LONGTEXT NULL,
+    `isPublish` BOOLEAN NULL,
+    `organizeid` LONGTEXT NULL,
+    `content` LONGTEXT NULL,
+    `create_time` DATETIME(0) NULL,
+    `knowledge_construction` INTEGER NULL,
+
+    INDEX `index_id`(`id`),
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `park_chat_file_list` (
+    `id` VARCHAR(255) NOT NULL,
+    `user_id` VARCHAR(255) NULL,
+    `file_names` LONGTEXT NOT NULL,
+    `file_ids` LONGTEXT NOT NULL,
+    `create_time` DATETIME(0) NULL,
+    `file_urls` LONGTEXT NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+-- CreateTable
+CREATE TABLE `token` (
+    `id` VARCHAR(255) NOT NULL,
+    `schoolId` VARCHAR(255) NULL,
+    `key` VARCHAR(255) NULL,
+    `createUsername` VARCHAR(255) NULL,
+    `createtime` DATETIME(0) NULL,
+
+    PRIMARY KEY (`id`)
+) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+

+ 250 - 0
prisma/schema.prisma

@@ -0,0 +1,250 @@
+generator client {
+  provider = "prisma-client-js"
+}
+
+datasource db {
+  provider = "mysql"
+  url      = env("DATABASE_URL")
+}
+
+model AWS_Policy_Role {
+  id                     String    @id @db.VarChar(36)
+  assistant_id           String?   @db.VarChar(36)
+  agent_bedrock_policy   String?   @db.LongText
+  agent_kb_schema_policy String?   @db.LongText
+  kb_bedrock_policy      String?   @db.LongText
+  kb_aoss_policy         String?   @db.LongText
+  kb_s3_policy           String?   @db.LongText
+  agent_role_name        String?   @db.Text
+  kb_role_name           String?   @db.Text
+  createtime             DateTime? @db.DateTime(0)
+}
+
+model Ai_Agent_Assistants {
+  id               String    @id @db.VarChar(36)
+  userId           String?   @db.VarChar(255)
+  username         String?   @db.VarChar(255)
+  agent_sort       String?   @db.VarChar(255)
+  agent_tag        String?   @db.VarChar(255)
+  assistantName    String?   @db.VarChar(255)
+  description      String?   @db.LongText
+  prologue         String?   @db.LongText
+  headUrl          String?   @db.LongText
+  instructions     String?   @db.LongText
+  isRetrieval      Boolean?
+  isCode           Boolean?
+  isGoogle         Boolean?
+  isDalleImage     Boolean?
+  functionNames    String?   @db.LongText
+  functionContents String?   @db.LongText
+  assistant_id     String?   @db.Text
+  thread_id        String?   @db.Text
+  file_ids         String?   @db.LongText
+  file_names       String?   @db.LongText
+  isPublish        Boolean?
+  organize_id      String?   @db.LongText
+  vector_store_id  String?   @db.Text
+  modelType        String?   @db.VarChar(255)
+  createtime       DateTime? @db.DateTime(0)
+  updatetime       DateTime? @db.DateTime(0)
+}
+
+model Ai_Agent_Threads {
+  id           String    @id @db.VarChar(36)
+  userId       String?   @db.VarChar(255)
+  assistant_id String?   @db.Text
+  thread_id    String?   @db.Text
+  createtime   DateTime? @db.DateTime(0)
+  session_name String    @default("") @db.VarChar(255)
+}
+
+model Assistant {
+  id              String    @id @db.VarChar(36)
+  uid             String?   @db.VarChar(36)
+  assistant_id    String?   @db.Text
+  thread_id       String?   @db.Text
+  file_ids        String?   @db.Text
+  vector_store_id String?   @db.Text
+  createtime      DateTime? @db.DateTime(0)
+}
+
+model Chat {
+  id           String    @id @default("") @db.VarChar(36)
+  groupid      String?   @db.VarChar(36)
+  userid       String?   @db.VarChar(36)
+  username     String?   @db.VarChar(255)
+  answer       String?   @db.Text
+  problem      String?   @db.LongText
+  createtime   DateTime? @db.DateTime(0)
+  fileid       String?   @db.VarChar(36)
+  isMindMap    Int?
+  filename     String?   @db.VarChar(255)
+  session_name String    @default("") @db.VarChar(255)
+  scene        String?   @db.VarChar(255)
+
+  @@index([createtime], map: "createtime")
+  @@index([fileid], map: "fileid")
+  @@index([groupid], map: "groupid")
+  @@index([userid], map: "userid")
+}
+
+model Disposition {
+  id                String    @id @db.VarChar(36)
+  module            String?   @db.VarChar(255)
+  disposition_class String?   @db.VarChar(255)
+  disposition_type  String?   @db.VarChar(255)
+  disposition_style String?   @db.VarChar(255)
+  disposition_theme String?   @db.VarChar(255)
+  user_id           String?   @db.VarChar(36)
+  create_time       DateTime? @db.DateTime(0)
+}
+
+model Group {
+  id         String    @id @db.VarChar(36)
+  name       String?   @db.VarChar(255)
+  userid     String?   @db.VarChar(36)
+  createtime DateTime? @db.DateTime(0)
+}
+
+model GroupFile {
+  id              String    @id @db.VarChar(36)
+  userid          String?   @db.VarChar(36)
+  fileurl         String?   @db.Text
+  filename        String?   @db.Text
+  groupid         String?   @db.VarChar(36)
+  abstract        String?   @db.Text
+  assistantFileId String?   @db.VarChar(36)
+  modelType       String?   @db.VarChar(36)
+  createtime      DateTime? @db.DateTime(0)
+
+  @@index([createtime], map: "createtime")
+  @@index([groupid], map: "groupid")
+}
+
+model InvitationCode {
+  id             String    @id @db.VarChar(36)
+  cid            String?   @db.VarChar(36)
+  themeId        String?   @db.VarChar(36)
+  type           Int?
+  invitationCode String?   @db.VarChar(36)
+  createtime     DateTime? @db.DateTime(0)
+}
+
+model ai_agent_park_session {
+  id             String    @id @db.VarChar(36)
+  session_name   String?   @db.VarChar(255)
+  user_id        String?   @db.VarChar(255)
+  isCocoNote     Int?      @db.TinyInt
+  createtime     DateTime? @db.DateTime(0)
+  work_area_text String?   @db.LongText
+  scene          String?   @db.VarChar(255)
+}
+
+model classroom_ob_comment {
+  id             String    @id @db.VarChar(255)
+  module_id      String    @db.VarChar(255)
+  module_name    String?   @db.VarChar(255)
+  nickname       String?   @db.VarChar(255)
+  commentContent String?   @db.LongText
+  audit_status   Int       @default(0)
+  t_id           String?   @db.VarChar(36)
+  create_time    DateTime? @db.DateTime(0)
+
+  @@index([audit_status, t_id], map: "tid_status")
+}
+
+model classroom_observation {
+  id         String    @id @db.VarChar(36)
+  jsonData   String?   @db.LongText
+  Type       Int?
+  tIndex     Int?
+  tId        String?   @db.VarChar(36)
+  createtime DateTime? @db.DateTime(0)
+  like_num   Int       @default(0)
+  like_data  String?   @db.LongText
+  userid     String?   @db.VarChar(255)
+  isdel      Int?      @default(0)
+  limitData  String?   @db.LongText
+
+  @@index([Type], map: "Type")
+  @@index([createtime], map: "createtime")
+  @@index([tIndex], map: "tIndex")
+  @@index([Type, tId], map: "type_tid")
+}
+
+model course_resource {
+  id             String  @id @db.VarChar(36)
+  subject        String? @db.VarChar(255)
+  grade          String? @db.VarChar(255)
+  textbook       String? @db.VarChar(255)
+  book_type      String? @db.VarChar(255)
+  unit           String? @db.VarChar(255)
+  period         String? @db.VarChar(255)
+  unit_content   String? @db.LongText
+  course_content String? @db.LongText
+}
+
+model knowledge_construction_doc {
+  id          String    @id @db.VarChar(255)
+  muti_id     String?   @db.VarChar(255)
+  user_id     String?   @db.VarChar(255)
+  session_id  String?   @db.VarChar(255)
+  content     String?   @db.LongText
+  create_time DateTime? @db.DateTime(0)
+}
+
+model meeting_trick {
+  id               String    @id @db.VarChar(36)
+  createtime       DateTime? @db.DateTime(0)
+  userid           String?   @db.VarChar(255)
+  meeting_name     String?   @db.VarChar(255)
+  meeting_original String?   @db.LongText
+  meeting_minutes  String?   @db.LongText
+  audio_url        String?   @db.VarChar(255)
+  duration         String?   @db.VarChar(255)
+  ab               String?   @db.LongText
+
+  @@index([userid], map: "get_meeting_trick")
+}
+
+model meeting_trick_chat {
+  id           String    @id @db.VarChar(36)
+  meeting_id   String?   @db.VarChar(36)
+  createtime   DateTime? @db.DateTime(0)
+  user_content String?   @db.Text
+  ai_content   String?   @db.Text
+
+  @@index([meeting_id], map: "get_meeting_trick_chat")
+}
+
+model muti_agent_list {
+  id                     String    @id @db.VarChar(255)
+  userid                 String?   @db.VarChar(255)
+  username               String?   @db.VarChar(255)
+  muti_name              String?   @db.VarChar(255)
+  description            String?   @db.LongText
+  isPublish              Boolean?
+  organizeid             String?   @db.LongText
+  content                String?   @db.LongText
+  create_time            DateTime? @db.DateTime(0)
+  knowledge_construction Int?
+
+  @@index([id], map: "index_id")
+}
+
+model park_chat_file_list {
+  id          String    @id @db.VarChar(255)
+  user_id     String?   @db.VarChar(255)
+  file_names  String    @db.LongText
+  file_ids    String    @db.LongText
+  create_time DateTime? @db.DateTime(0)
+  file_urls   String?   @db.LongText
+}
+
+model token {
+  id             String    @id @db.VarChar(255)
+  schoolId       String?   @db.VarChar(255)
+  key            String?   @db.VarChar(255)
+  createUsername String?   @db.VarChar(255)
+  createtime     DateTime? @db.DateTime(0)
+}