You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
838 B

// 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 = "postgres://Nodebooru:Nodebooru@localhost:5432/Nodebooru" // TODO: Move this to env vars.
}
model User {
id BigInt @id
name String @unique // TODO: Make absolutely sure, before deployment, that this is never >50 chars
createdAt DateTime @default(now())
seenAt DateTime @default(now())
role String?
// Relations
posts Post[]
}
model Post {
id BigInt @id
uploaderId BigInt @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
URI String?
// Relations
uploader User @relation(fields: [uploaderId], references: [id])
}