feat: 完成真实咨询提交闭环

This commit is contained in:
que01 committed 2026-09-23 09:30:47 +08:00
1 parent 16b0967dc5
commit ba0069ae6d
9 files changed
+259 -70

No files matched your search

@@ -0,0 +1,8 @@
ALTER TABLE "InquirySubmission" ADD COLUMN "customerSubject" TEXT;
UPDATE "InquirySubmission" SET "customerSubject" = 'legacy' WHERE "customerSubject" IS NULL;
ALTER TABLE "InquirySubmission" ALTER COLUMN "customerSubject" SET NOT NULL;
CREATE INDEX "InquirySubmission_brandId_customerSubject_createdAt_idx"
ON "InquirySubmission"("brandId", "customerSubject", "createdAt");
+2
View File
@@ -190,6 +190,7 @@ model InquirySubmission {
brandId String
inquiryFormId String
offeringId String?
customerSubject String
brand BrandProfile @relation(fields: [brandId], references: [id], onDelete: Cascade)
inquiryForm InquiryForm @relation(fields: [inquiryFormId], references: [id], onDelete: Restrict)
offering Offering? @relation(fields: [offeringId], references: [id], onDelete: SetNull)
@@ -203,6 +204,7 @@ model InquirySubmission {
statusHistory InquirySubmissionStatusHistory[]
createdAt DateTime @default(now())
@@index([brandId, createdAt])
@@index([brandId, customerSubject, createdAt])
@@index([inquiryFormId, formVersion])
}