refactor: 移除旧服务模型统一使用业务提供项

This commit is contained in:
que01 committed 2026-09-21 17:11:45 +08:00
1 parent ca85a583ce
commit 844a3bd715
13 files changed
+92 -146

No files matched your search

-30
View File
@@ -48,7 +48,6 @@ model BrandProfile {
config Json?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
services Service[]
bookings Booking[]
customerUsers CustomerUser[]
tags Tag[]
@@ -61,30 +60,6 @@ model BrandProfile {
inquirySubmissions InquirySubmission[]
}
model Service {
id String @id @default(uuid())
brandId String
brand BrandProfile @relation(fields: [brandId], references: [id])
name String
description String
categoryKey String @default("standard")
config Json?
coverUrl String?
priceText String?
priceAmount Int?
bookingEnabled Boolean @default(true)
isEnabled Boolean @default(true)
sortOrder Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
bookings Booking[]
bookingItems BookingItem[]
offeringId String?
offering Offering? @relation(fields: [offeringId], references: [id], onDelete: SetNull)
@@unique([brandId, name])
@@index([brandId, isEnabled, sortOrder])
}
model BrandTemplateInstallation {
id String @id @default(uuid())
brandId String
@@ -151,7 +126,6 @@ model Offering {
config Json?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
services Service[]
inquiryForms InquiryForm[]
bookings Booking[]
bookingItems BookingItem[]
@@ -235,8 +209,6 @@ model Booking {
wechatId String?
contactPreference ContactPreference
fulfillmentType FulfillmentType?
serviceId String?
service Service? @relation(fields: [serviceId], references: [id], onDelete: SetNull)
offeringId String?
offering Offering? @relation(fields: [offeringId], references: [id], onDelete: SetNull)
requestedDate DateTime?
@@ -277,8 +249,6 @@ model BookingItem {
id String @id @default(uuid())
bookingId String
booking Booking @relation(fields: [bookingId], references: [id], onDelete: Cascade)
serviceId String?
service Service? @relation(fields: [serviceId], references: [id], onDelete: SetNull)
offeringId String?
offering Offering? @relation(fields: [offeringId], references: [id], onDelete: SetNull)
serviceNameSnapshot String