feat(store): 门店套餐 v3.4.10 全端实现
新增 StorePackage 与变更审核流,覆盖总部直存、合伙/门店提审、C 端展示与套餐异议工单;同步 PRD/开发文档与 REQ 索引。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -92,6 +92,7 @@ enum TicketType {
|
||||
ALERT
|
||||
DAMAGE_RETURN
|
||||
RETURN_REFUND
|
||||
PACKAGE_DISPUTE
|
||||
}
|
||||
|
||||
enum SupportTicketType {
|
||||
@@ -256,6 +257,17 @@ enum StoreAuditStatus {
|
||||
REJECTED
|
||||
}
|
||||
|
||||
enum StorePackageChangeStatus {
|
||||
PENDING
|
||||
APPROVED
|
||||
REJECTED
|
||||
}
|
||||
|
||||
enum StorePackageSubmitterType {
|
||||
PARTNER
|
||||
SHOP
|
||||
}
|
||||
|
||||
enum UserSourceType {
|
||||
ORGANIC
|
||||
PROMO_CODE
|
||||
@@ -1093,6 +1105,8 @@ model Store {
|
||||
storeBills StoreBill[]
|
||||
withdrawRequests StoreWithdrawRequest[]
|
||||
visibilityPhones StoreVisibilityPhone[]
|
||||
packages StorePackage[]
|
||||
packageChangeRequests StorePackageChangeRequest[]
|
||||
|
||||
@@index([cityId, status])
|
||||
@@index([partnerAccountId])
|
||||
@@ -1114,6 +1128,43 @@ model StoreVisibilityPhone {
|
||||
@@map("store_visibility_phone")
|
||||
}
|
||||
|
||||
model StorePackage {
|
||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||
storeId BigInt @map("store_id") @db.UnsignedBigInt
|
||||
name String @db.VarChar(128)
|
||||
price Decimal @db.Decimal(10, 2)
|
||||
dishes String @db.Text
|
||||
usableTime String? @map("usable_time") @db.VarChar(256)
|
||||
otherNotes String? @map("other_notes") @db.VarChar(512)
|
||||
sortOrder Int @default(0) @map("sort_order")
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.DateTime(3)
|
||||
updatedAt DateTime @updatedAt @map("updated_at") @db.DateTime(3)
|
||||
|
||||
store Store @relation(fields: [storeId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([storeId, sortOrder])
|
||||
@@map("store_package")
|
||||
}
|
||||
|
||||
model StorePackageChangeRequest {
|
||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||
storeId BigInt @map("store_id") @db.UnsignedBigInt
|
||||
status StorePackageChangeStatus @default(PENDING)
|
||||
packagesJson Json @map("packages_json")
|
||||
submitterType StorePackageSubmitterType @map("submitter_type")
|
||||
submitterId BigInt @map("submitter_id") @db.UnsignedBigInt
|
||||
rejectReason String? @map("reject_reason") @db.VarChar(512)
|
||||
reviewedAt DateTime? @map("reviewed_at") @db.DateTime(3)
|
||||
reviewerId BigInt? @map("reviewer_id") @db.UnsignedBigInt
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.DateTime(3)
|
||||
|
||||
store Store @relation(fields: [storeId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([storeId, status])
|
||||
@@index([status, createdAt])
|
||||
@@map("store_package_change_request")
|
||||
}
|
||||
|
||||
model StoreAccount {
|
||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||
phone String @unique @db.VarChar(20)
|
||||
|
||||
Reference in New Issue
Block a user