2023-06-20 20:05:15 +00:00
|
|
|
// 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"
|
|
|
|
}
|
|
|
|
|
|
|
|
datasource db {
|
|
|
|
provider = "postgresql"
|
|
|
|
url = env("DATABASE_URL")
|
|
|
|
}
|
|
|
|
|
|
|
|
model User {
|
2023-07-17 20:47:05 +00:00
|
|
|
id String @id @default(uuid())
|
|
|
|
displayName String?
|
|
|
|
username String @unique
|
|
|
|
email String @unique
|
|
|
|
password String
|
|
|
|
posts Post[]
|
|
|
|
profileImage String?
|
|
|
|
createdAt DateTime @default(now())
|
2023-06-20 20:05:15 +00:00
|
|
|
}
|
2023-06-23 18:15:11 +00:00
|
|
|
|
|
|
|
model Post {
|
|
|
|
id String @id @default(uuid())
|
|
|
|
content String
|
|
|
|
authorId String
|
|
|
|
author User @relation(fields: [authorId], references: [id])
|
|
|
|
createdAt DateTime @default(now())
|
2023-06-27 23:24:26 +00:00
|
|
|
updatedAt DateTime @updatedAt
|
2023-06-23 18:15:11 +00:00
|
|
|
}
|