stuff done
This commit is contained in:
26
lib/db/prisma/schema/order.prisma
Normal file
26
lib/db/prisma/schema/order.prisma
Normal file
@@ -0,0 +1,26 @@
|
||||
model Order {
|
||||
id Int @id @default(autoincrement())
|
||||
storeId Int @default(1) @map("store_id")
|
||||
lang Lang
|
||||
orderNo String @map("order_no") @db.VarChar(45)
|
||||
isQuick Boolean @map("is_quick")
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
userId Int? @map("user_id")
|
||||
firstName String @map("first_name") @db.VarChar(255)
|
||||
patronymic String? @db.VarChar(255)
|
||||
surname String? @db.VarChar(255)
|
||||
deliveryOption DeliveryOption? @map("delivery_option")
|
||||
phone String? @db.Char(24)
|
||||
email String? @db.VarChar(320)
|
||||
emailSent Boolean? @map("email_sent")
|
||||
/// [OrderAddressType]
|
||||
address Json?
|
||||
notes String? @db.MediumText
|
||||
/// [OrderDetailsType]
|
||||
details Json
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamp(3)
|
||||
updatedAt DateTime? @default(dbgenerated("NULL DEFAULT NULL ON UPDATE current_timestamp(3)")) @map("updated_at") @db.Timestamp(3)
|
||||
|
||||
@@unique([orderNo, storeId])
|
||||
@@map("orders")
|
||||
}
|
||||
Reference in New Issue
Block a user