R23-1/R23-2/R23-4:完成项目沟通回填与收口治理后端
这个提交包含在:
+71
-4
@@ -417,6 +417,22 @@ enum ProjectDeliveryRecordType {
|
||||
handover
|
||||
}
|
||||
|
||||
enum ProjectCommunicationChannel {
|
||||
wechat
|
||||
phone
|
||||
meeting
|
||||
wecom
|
||||
email
|
||||
onsite
|
||||
other
|
||||
}
|
||||
|
||||
enum ProjectClosureChecklistStatus {
|
||||
pending
|
||||
done
|
||||
waived
|
||||
}
|
||||
|
||||
enum ConfidentialityLevel {
|
||||
public
|
||||
internal
|
||||
@@ -564,6 +580,8 @@ model Employee {
|
||||
created_project_tasks ProjectTask[] @relation("ProjectTaskCreator")
|
||||
owned_project_risks ProjectRisk[] @relation("ProjectRiskOwner")
|
||||
owned_project_delivery_records ProjectDeliveryRecord[] @relation("ProjectDeliveryRecordOwner")
|
||||
created_project_communication_logs ProjectCommunicationLog[] @relation("ProjectCommunicationLogCreator")
|
||||
completed_project_closure_checklists ProjectClosureChecklistItem[] @relation("ProjectClosureChecklistItemCompleter")
|
||||
owned_contract_registries ContractRegistry[] @relation("ContractRegistryOwner")
|
||||
owned_confidential_document_refs ConfidentialDocumentRef[] @relation("ConfidentialDocumentRefOwner")
|
||||
|
||||
@@ -1767,10 +1785,12 @@ model Project {
|
||||
reimbursements ReimbursementForm[]
|
||||
travel_requests TravelRequest[]
|
||||
todo_items TodoItem[]
|
||||
weekly_reports ProjectLinkOnWeeklyReport[]
|
||||
contracts ContractRegistry[]
|
||||
deliveries ProjectDeliveryRecord[]
|
||||
document_refs ConfidentialDocumentRef[]
|
||||
weekly_reports ProjectLinkOnWeeklyReport[]
|
||||
communication_logs ProjectCommunicationLog[]
|
||||
closure_checklist_items ProjectClosureChecklistItem[]
|
||||
contracts ContractRegistry[]
|
||||
deliveries ProjectDeliveryRecord[]
|
||||
document_refs ConfidentialDocumentRef[]
|
||||
|
||||
@@index([owner_employee_id, status], map: "idx_projects_owner_status")
|
||||
@@index([manager_employee_id, status], map: "idx_projects_manager_status")
|
||||
@@ -1880,6 +1900,53 @@ model ProjectLinkOnWeeklyReport {
|
||||
@@map("weekly_report_project_links")
|
||||
}
|
||||
|
||||
model ProjectCommunicationLog {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
project_id String @db.Uuid
|
||||
happened_at DateTime
|
||||
channel ProjectCommunicationChannel
|
||||
external_contact_name String?
|
||||
external_org_name String?
|
||||
summary String
|
||||
next_action String?
|
||||
next_follow_up_date DateTime? @db.Date
|
||||
created_by String @db.Uuid
|
||||
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @default(now()) @updatedAt
|
||||
|
||||
project Project @relation(fields: [project_id], references: [id], onDelete: Cascade)
|
||||
creator Employee @relation("ProjectCommunicationLogCreator", fields: [created_by], references: [id], onDelete: Restrict)
|
||||
|
||||
@@index([project_id, happened_at], map: "idx_project_communication_logs_project_happened")
|
||||
@@index([project_id, next_follow_up_date], map: "idx_project_communication_logs_followup")
|
||||
@@index([created_by, created_at], map: "idx_project_communication_logs_creator_created")
|
||||
@@map("project_communication_logs")
|
||||
}
|
||||
|
||||
model ProjectClosureChecklistItem {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
project_id String @db.Uuid
|
||||
item_key String @db.VarChar(64)
|
||||
title String
|
||||
status ProjectClosureChecklistStatus @default(pending)
|
||||
note String?
|
||||
sort_order Int @default(100)
|
||||
completed_at DateTime?
|
||||
completed_by String? @db.Uuid
|
||||
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @default(now()) @updatedAt
|
||||
|
||||
project Project @relation(fields: [project_id], references: [id], onDelete: Cascade)
|
||||
completer Employee? @relation("ProjectClosureChecklistItemCompleter", fields: [completed_by], references: [id], onDelete: SetNull)
|
||||
|
||||
@@unique([project_id, item_key], map: "project_closure_checklists_project_key_ux")
|
||||
@@index([project_id, status, sort_order], map: "idx_project_closure_checklists_project_status")
|
||||
@@index([completed_by, completed_at], map: "idx_project_closure_checklists_completed")
|
||||
@@map("project_closure_checklist_items")
|
||||
}
|
||||
|
||||
model ContractRegistry {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
contract_no String @unique
|
||||
|
||||
在新工单中引用
屏蔽一个用户