2023-06-08 16:03:27 +00:00
|
|
|
// datasource db {
|
|
|
|
// provider = "mongodb"
|
|
|
|
// url = env("DATABASE_URL")
|
|
|
|
// }
|
2023-06-08 11:05:28 +00:00
|
|
|
|
2023-06-08 16:03:27 +00:00
|
|
|
// generator client {
|
|
|
|
// provider = "prisma-client-js"
|
|
|
|
// }
|
2023-06-08 11:05:28 +00:00
|
|
|
|
2023-06-08 16:03:27 +00:00
|
|
|
// model User {
|
|
|
|
// id String @id @default(cuid()) @map("_id")
|
|
|
|
// firstName String
|
|
|
|
// lastName String
|
|
|
|
// email String @unique
|
|
|
|
// password String
|
|
|
|
// address String
|
|
|
|
// createdAt DateTime @default(now())
|
|
|
|
// updatedAt DateTime @updatedAt
|
|
|
|
// }
|
2023-06-08 11:55:04 +00:00
|
|
|
|
2023-06-08 16:03:27 +00:00
|
|
|
// model Item {
|
|
|
|
// id String @id @default(cuid()) @map("_id")
|
|
|
|
// name String
|
|
|
|
// price Float
|
|
|
|
// quantity Int @default(0)
|
|
|
|
// createdAt DateTime @default(now())
|
|
|
|
// updatedAt DateTime @updatedAt
|
|
|
|
// }
|
2023-06-08 11:55:04 +00:00
|
|
|
|
2023-06-08 16:03:27 +00:00
|
|
|
// model Cart {
|
|
|
|
// id String @id @default(cuid()) @map("_id")
|
|
|
|
// userId String
|
|
|
|
// itemId String
|
|
|
|
// createdAt DateTime @default(now())
|
|
|
|
// updatedAt DateTime @updatedAt
|
|
|
|
// @@unique([userId, itemId])
|
|
|
|
// }
|