model User {
id String @id @default(cuid())
firstName String
lastName String
email String @unique
phone String @unique
password String
verificationCode String?
posts Post[]
favoritePosts Post[]
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
}
model Post {
id String @id @default(cuid())
slug String
title String
description String
price Int
images String[]
reports Report[]
userId String
user User @relation(fields: [userId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
}
model User {
id String @id @default(cuid())
firstName String
lastName String
email String @unique
phone String @unique
password String
verificationCode String?
posts Post[]
favoritePosts Post[]
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
}
model Post {
id String @id @default(cuid())
slug String
title String
description String
price Int
images String[]
reports Report[]
userId String
user User @relation(fields: [userId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
}