base commit
This commit is contained in:
@@ -56,11 +56,33 @@ model User {
|
||||
id String @id @default(cuid())
|
||||
email String @unique
|
||||
name String?
|
||||
phone String?
|
||||
passwordHash String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
codes AuthCode[]
|
||||
addresses ShippingAddress[]
|
||||
}
|
||||
|
||||
model ShippingAddress {
|
||||
id String @id @default(cuid())
|
||||
label String?
|
||||
recipientName String
|
||||
recipientPhone String
|
||||
addressLine String
|
||||
comment String?
|
||||
lat Float
|
||||
lng Float
|
||||
isDefault Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
userId String
|
||||
|
||||
@@index([userId, isDefault])
|
||||
@@index([userId, updatedAt])
|
||||
}
|
||||
|
||||
model AuthCode {
|
||||
|
||||
Reference in New Issue
Block a user