generated from nhcarrigan/template
94 lines
2.1 KiB
Plaintext
94 lines
2.1 KiB
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
|
|
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
|
|
|
|
generator client {
|
|
provider = "prisma-client"
|
|
output = "../generated/prisma"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "mongodb"
|
|
}
|
|
|
|
model Game {
|
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
title String
|
|
platform String?
|
|
status GameStatus
|
|
dateAdded DateTime @default(now())
|
|
dateCompleted DateTime?
|
|
rating Int? @db.Int @default(0)
|
|
notes String?
|
|
coverImage String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
enum GameStatus {
|
|
PLAYING
|
|
COMPLETED
|
|
BACKLOG
|
|
}
|
|
|
|
model Book {
|
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
title String
|
|
author String
|
|
isbn String?
|
|
status BookStatus
|
|
dateAdded DateTime @default(now())
|
|
dateFinished DateTime?
|
|
rating Int? @db.Int @default(0)
|
|
notes String?
|
|
coverImage String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
enum BookStatus {
|
|
READING
|
|
FINISHED
|
|
TO_READ
|
|
}
|
|
|
|
model Music {
|
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
title String
|
|
artist String
|
|
type MusicType
|
|
status MusicStatus
|
|
dateAdded DateTime @default(now())
|
|
dateCompleted DateTime?
|
|
rating Int? @db.Int @default(0)
|
|
notes String?
|
|
coverArt String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
enum MusicType {
|
|
ALBUM
|
|
SINGLE
|
|
EP
|
|
}
|
|
|
|
enum MusicStatus {
|
|
LISTENING
|
|
COMPLETED
|
|
WANT_TO_LISTEN
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
discordId String @unique
|
|
username String
|
|
email String @unique
|
|
avatar String?
|
|
isAdmin Boolean @default(false)
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|