timestamps, scalars and dayjs

This commit is contained in:
Benjamin Palko 2024-12-10 21:31:42 -05:00
parent be2e559602
commit fec67a55c7
6 changed files with 44 additions and 12 deletions

View file

@ -15,17 +15,21 @@ datasource db {
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
createdAt DateTime
updatedAt DateTime
}
model Post {
id Int @id @default(autoincrement())
id Int @id @default(autoincrement())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId Int
createdAt DateTime
updatedAt DateTime
}