feat: 后端搜索接口开发
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
// This is your Prisma schema file,
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "mysql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Account {
|
||||
id Int @id @default(autoincrement())
|
||||
driveType String @unique
|
||||
accountIdentifier String
|
||||
credentials String @db.Text
|
||||
status String @default("active")
|
||||
lastChecked DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
transcodeRecords TranscodeRecord[]
|
||||
activityLogs ActivityLog[]
|
||||
}
|
||||
|
||||
model TranscodeRecord {
|
||||
id Int @id @default(autoincrement())
|
||||
itemId String @index
|
||||
sourceLink String @db.Text
|
||||
driveType String
|
||||
managedAccountId Int
|
||||
status String @default("pending")
|
||||
tempLink String? @db.Text
|
||||
transferredFileId String?
|
||||
transferStartTime DateTime @default(now())
|
||||
transferEndTime DateTime?
|
||||
errorCode String?
|
||||
errorMessage String? @db.Text
|
||||
cleanupStatus String @default("pending") @index
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
account Account @relation(fields: [managedAccountId], references: [id])
|
||||
}
|
||||
|
||||
model ActivityLog {
|
||||
id BigInt @id @default(autoincrement())
|
||||
timestamp DateTime @default(now())
|
||||
operationType String
|
||||
clientIp String?
|
||||
keyword String?
|
||||
itemId String? @index
|
||||
driveType String?
|
||||
managedAccountId Int?
|
||||
generatedLink String? @db.Text
|
||||
errorCode String?
|
||||
errorMessage String? @db.Text
|
||||
durationMs Int?
|
||||
details String? @db.Text
|
||||
account Account? @relation(fields: [managedAccountId], references: [id])
|
||||
}
|
||||
Reference in New Issue
Block a user