mirror of
https://github.com/hknsh/project-knedita.git
synced 2024-11-28 17:41:15 +00:00
30 lines
No EOL
719 B
Text
30 lines
No EOL
719 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"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(uuid())
|
|
displayName String?
|
|
username String @unique
|
|
email String @unique
|
|
password String
|
|
posts Post[]
|
|
createdAt DateTime @default(now())
|
|
}
|
|
|
|
model Post {
|
|
id String @id @default(uuid())
|
|
content String
|
|
authorId String
|
|
author User @relation(fields: [authorId], references: [id])
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @default(now())
|
|
} |