stuff done

This commit is contained in:
2025-03-11 02:54:09 +02:00
parent 58e7ed2f06
commit 516b45fad9
90 changed files with 2950 additions and 9458 deletions

View 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")
}