feat(storage): integrate Alibaba Cloud OSS for file persistence - Add OSSAdapter and LocalAdapter with StorageFactory pattern - Integrate PKB module with OSS upload - Rename difyDocumentId to storageKey - Create 4 OSS buckets and development specification
This commit is contained in:
@@ -152,7 +152,7 @@ model Document {
|
||||
fileType String @map("file_type")
|
||||
fileSizeBytes BigInt @map("file_size_bytes")
|
||||
fileUrl String @map("file_url")
|
||||
difyDocumentId String @map("dify_document_id")
|
||||
storageKey String @map("dify_document_id") // 原 difyDocumentId,现存储 OSS 路径
|
||||
status String @default("uploading")
|
||||
progress Int @default(0)
|
||||
errorMessage String? @map("error_message")
|
||||
@@ -168,7 +168,7 @@ model Document {
|
||||
batchResults BatchResult[] @relation("DocumentBatchResults")
|
||||
knowledgeBase KnowledgeBase @relation("KnowledgeBaseDocuments", fields: [kbId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([difyDocumentId], map: "idx_pkb_documents_dify_document_id")
|
||||
@@index([storageKey], map: "idx_pkb_documents_dify_document_id") // 保留原索引名
|
||||
@@index([extractionMethod], map: "idx_pkb_documents_extraction_method")
|
||||
@@index([kbId], map: "idx_pkb_documents_kb_id")
|
||||
@@index([status], map: "idx_pkb_documents_status")
|
||||
|
||||
Reference in New Issue
Block a user