ava/prisma/schema.prisma

41 lines
897 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[]
2024-11-20 02:17:45 -08:00
currentAvatarId String? @unique
currentAvatar Avatar? @relation("CurrentAvatar", fields: [currentAvatarId], references: [id])
}
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
2024-11-20 02:17:45 -08:00
usedBy User? @relation("CurrentAvatar")
2024-11-19 17:34:49 -08:00
altText String?
2024-11-19 17:34:49 -08:00
source String?
}