Files
abumahid 78a9b99aae feat(order): add customer email and optional fields, update order creation flow
- Added `customerEmail` field to Order model.
- Made `customerNote` optional in the Order model.
- Updated order creation logic to send a tracking email.
- Updated order validation to handle optional fields.
- Refactored configurations import path from `errors/configs` to `configs`.
- Minor modifications across account and order services for consistency.
2026-04-13 00:13:52 +06:00

31 lines
664 B
Plaintext

enum STATUS {
INITIATED
CONFIRMED
ONGOING
DELIVERED
CANCELLED
}
enum PAYMENT_TYPE {
COD
}
model Order {
id String @id @default(uuid())
shopAccountId String
account Account @relation(fields: [shopAccountId], references: [id], onDelete: Cascade)
productPrice Int
productQuantity Int
productName String
status STATUS
customerName String
customerPhone String
customerEmail String?
customerAddress String
customerNote String?
paymentType PAYMENT_TYPE
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}