feat: 统一两端界面并扩展受权限约束的AI助手
This commit is contained in:
1 parent
79a31ebe9d
commit
0b35a58f07
141 files changed
+7999
-2213
No files matched your search
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE "AiPlanStep" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"auditId" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"ordinal" INTEGER NOT NULL,
|
||||
"payload" TEXT NOT NULL,
|
||||
"state" TEXT NOT NULL DEFAULT 'draft',
|
||||
"result" TEXT NOT NULL DEFAULT '',
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL
|
||||
);
|
||||
CREATE UNIQUE INDEX "AiPlanStep_auditId_ordinal_key" ON "AiPlanStep"("auditId", "ordinal");
|
||||
CREATE INDEX "AiPlanStep_userId_createdAt_idx" ON "AiPlanStep"("userId", "createdAt");
|
||||
@@ -813,3 +813,19 @@ model CoursewareReceipt {
|
||||
device ClientDevice @relation(fields: [deviceId], references: [id], onDelete: Cascade)
|
||||
@@id([pushId, deviceId])
|
||||
}
|
||||
|
||||
/// AI 确认计划与执行去重;payload 加密保存,不保存明文凭据。
|
||||
model AiPlanStep {
|
||||
id String @id @default(cuid())
|
||||
auditId String
|
||||
userId String
|
||||
ordinal Int
|
||||
payload String
|
||||
state String @default("draft")
|
||||
result String @default("")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([auditId, ordinal])
|
||||
@@index([userId, createdAt])
|
||||
}
|
||||
Reference in new issue
Block a user