2024-09-22 20:50:28 +08:00
|
|
|
|
generator client {
|
|
|
|
|
provider = "prisma-client-js"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
datasource db {
|
|
|
|
|
provider = "mongodb"
|
|
|
|
|
url = env("DATABASE_URL")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 系统人设
|
|
|
|
|
model SystemCharter {
|
|
|
|
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
|
|
|
// 角色名称
|
|
|
|
|
roleName String
|
|
|
|
|
// 角色描述
|
|
|
|
|
roleSetting String?
|
|
|
|
|
// 角色简介
|
|
|
|
|
prologue String
|
|
|
|
|
// 开场白
|
|
|
|
|
intro String
|
|
|
|
|
// 对话 json格式
|
|
|
|
|
roleLines String?
|
|
|
|
|
// 照片
|
|
|
|
|
photo String?
|
|
|
|
|
// 背景
|
|
|
|
|
bg String?
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
2024-12-02 20:12:22 +08:00
|
|
|
|
|
|
|
|
|
// 音色id
|
|
|
|
|
voiceId String?
|
|
|
|
|
// 音色名称
|
|
|
|
|
voiceName String?
|
|
|
|
|
|
2024-12-03 14:58:40 +08:00
|
|
|
|
// 剩余可克隆次数
|
|
|
|
|
remainingCloneCount Int @default(10)
|
|
|
|
|
|
2024-12-02 20:12:22 +08:00
|
|
|
|
// 原始音频
|
|
|
|
|
originAudioUrl String?
|
|
|
|
|
// 克隆音频
|
|
|
|
|
cloneAfterAudioUrl String?
|
|
|
|
|
// 是否激活
|
|
|
|
|
activate Boolean @default(false)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 任务队列
|
|
|
|
|
model TaskQueue {
|
|
|
|
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
|
|
|
// 任务类型
|
|
|
|
|
type String
|
2024-12-03 14:58:40 +08:00
|
|
|
|
// 任务名称
|
|
|
|
|
roleName String?
|
|
|
|
|
// 角色id
|
|
|
|
|
roleId String?
|
2024-12-02 20:12:22 +08:00
|
|
|
|
// 任务数据
|
|
|
|
|
data String
|
|
|
|
|
// 任务状态: pending/processing/completed/failed
|
|
|
|
|
status String
|
|
|
|
|
// 失败原因
|
|
|
|
|
error String?
|
|
|
|
|
// 重试次数
|
|
|
|
|
attempts Int @default(0)
|
2024-12-03 14:58:40 +08:00
|
|
|
|
// 最大重试次数 (不需要这个逻辑了)
|
2024-12-02 20:12:22 +08:00
|
|
|
|
maxAttempts Int @default(3)
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
2024-09-22 20:50:28 +08:00
|
|
|
|
}
|
2024-12-03 14:58:40 +08:00
|
|
|
|
|
|
|
|
|
model CloneHistory {
|
|
|
|
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
|
|
|
roleId String // 角色ID
|
|
|
|
|
roleName String // 角色名称
|
|
|
|
|
cloneUrl String // 克隆URL
|
|
|
|
|
speakerId String? // 克隆后的speakerId
|
|
|
|
|
status String // 任务状态:pending, processing, success, failed
|
|
|
|
|
error String? // 错误信息
|
|
|
|
|
taskId String? // 关联的任务ID
|
|
|
|
|
createdAt DateTime @default(now())
|
|
|
|
|
updatedAt DateTime @updatedAt
|
|
|
|
|
}
|