ava/prisma/schema.prisma

42 lines
917 B
Plaintext
Raw Normal View History

2024-07-09 21:54:17 -07:00
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
2024-11-19 17:34:49 -08:00
provider = "prisma-client-js"
2024-07-11 02:38:57 -07:00
binaryTargets = ["native", "debian-openssl-1.1.x"]
2024-07-09 21:54:17 -07:00
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model Token {
2024-11-19 17:34:49 -08:00
id String @id @unique @default(uuid())
owner String
token String
2024-07-10 00:23:38 -07:00
refreshToken String?
2024-07-10 19:17:50 -07:00
}
model User {
2024-11-19 17:34:49 -08:00
userId String @id @unique
2024-07-10 19:17:50 -07:00
identifier String
2024-11-19 17:34:49 -08:00
name String?
avatars Avatar[]
currentAvatarId String?
currentAvatar Avatar? @relation("CurrentAvatar")
}
model Avatar {
2024-11-19 17:34:49 -08:00
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?
2024-11-19 17:34:49 -08:00
source String?
}