* split up files * timestamps, scalars and dayjs * lib server directory * move bun types to dev * move storybook dark mode to dev * got timestamps working * fix reference * separate schema into files and add mutations
35 lines
No EOL
827 B
Text
35 lines
No EOL
827 B
Text
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
generator pothos {
|
|
provider = "prisma-pothos-types"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement()) @unique
|
|
email String? @unique
|
|
name String
|
|
posts Post[]
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @default(now()) @updatedAt
|
|
}
|
|
|
|
model Post {
|
|
id Int @id @default(autoincrement())
|
|
title String
|
|
content String
|
|
published Boolean? @default(false)
|
|
author User @relation(fields: [authorId], references: [id])
|
|
authorId Int
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @default(now()) @updatedAt
|
|
} |