fix;提交、
This commit is contained in:
@@ -83,6 +83,24 @@ enum TicketType {
|
||||
REFUND
|
||||
RESHIPMENT
|
||||
ALERT
|
||||
DAMAGE_RETURN
|
||||
RETURN_REFUND
|
||||
}
|
||||
|
||||
enum InvoiceTitleType {
|
||||
PERSONAL
|
||||
ENTERPRISE
|
||||
}
|
||||
|
||||
enum InvoiceKind {
|
||||
NORMAL
|
||||
SPECIAL
|
||||
}
|
||||
|
||||
enum InvoiceStatus {
|
||||
PENDING
|
||||
ISSUED
|
||||
REJECTED
|
||||
}
|
||||
|
||||
enum AromaType {
|
||||
@@ -705,6 +723,7 @@ model User {
|
||||
promoTouch UserPromoAttribution?
|
||||
ownedPromoCodes CommonPromoCode[] @relation("PromoOwnerUser")
|
||||
orders Order[]
|
||||
invoices UserInvoice[]
|
||||
benefitCoupons BenefitCoupon[]
|
||||
redeemRecords RedeemRecord[]
|
||||
redeemPendingRecords RedeemPendingRecord[]
|
||||
@@ -919,6 +938,7 @@ model Order {
|
||||
imageResource CommonResource? @relation("OrderProductImage", fields: [imageResourceId], references: [id], onDelete: SetNull)
|
||||
delivery OrderDelivery?
|
||||
benefitCoupon BenefitCoupon?
|
||||
invoices UserInvoice[]
|
||||
|
||||
@@index([userId, status])
|
||||
@@index([cityId, createdAt])
|
||||
@@ -931,6 +951,37 @@ model Order {
|
||||
@@map("user_order")
|
||||
}
|
||||
|
||||
model UserInvoice {
|
||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||
invoiceNo String @unique @map("invoice_no") @db.VarChar(32)
|
||||
orderId BigInt @map("order_id") @db.UnsignedBigInt
|
||||
userId BigInt @map("user_id") @db.UnsignedBigInt
|
||||
titleType InvoiceTitleType @map("title_type")
|
||||
invoiceKind InvoiceKind @map("invoice_kind")
|
||||
titleName String @map("title_name") @db.VarChar(128)
|
||||
taxNo String? @map("tax_no") @db.VarChar(32)
|
||||
addressPhone String? @map("address_phone") @db.VarChar(256)
|
||||
bankAccount String? @map("bank_account") @db.VarChar(256)
|
||||
email String @db.VarChar(128)
|
||||
phone String @db.VarChar(20)
|
||||
status InvoiceStatus @default(PENDING)
|
||||
fileUrl String? @map("file_url") @db.VarChar(512)
|
||||
resourceId BigInt? @map("resource_id") @db.UnsignedBigInt
|
||||
issuedAt DateTime? @map("issued_at") @db.DateTime(3)
|
||||
operatorId BigInt? @map("operator_id") @db.UnsignedBigInt
|
||||
remark String? @db.VarChar(512)
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.DateTime(3)
|
||||
updatedAt DateTime @updatedAt @map("updated_at") @db.DateTime(3)
|
||||
|
||||
order Order @relation(fields: [orderId], references: [id], onDelete: Restrict)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Restrict)
|
||||
|
||||
@@index([userId, status])
|
||||
@@index([orderId])
|
||||
@@index([status, createdAt])
|
||||
@@map("user_invoice")
|
||||
}
|
||||
|
||||
model OrderDelivery {
|
||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||
orderId BigInt @unique @map("order_id") @db.UnsignedBigInt
|
||||
|
||||
Reference in New Issue
Block a user