42 lines
917 B
Plaintext
42 lines
917 B
Plaintext
// 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"
|
|
binaryTargets = ["native", "debian-openssl-1.1.x"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model Token {
|
|
id String @id @unique @default(uuid())
|
|
owner String
|
|
token String
|
|
refreshToken String?
|
|
}
|
|
|
|
model User {
|
|
userId String @id @unique
|
|
identifier String
|
|
name String?
|
|
avatars Avatar[]
|
|
|
|
currentAvatarId String?
|
|
currentAvatar Avatar? @relation("CurrentAvatar")
|
|
}
|
|
|
|
model Avatar {
|
|
id String @id @unique @default(uuid())
|
|
user User @relation(fields: [userId], references: [userId])
|
|
userId String
|
|
|
|
usedBy User? @relation("CurrentAvatar", fields: [usedById], references: [userId])
|
|
usedById String? @unique
|
|
|
|
altText String?
|
|
source String?
|
|
}
|