Add user profile image

This commit is contained in:
jeffvli
2022-11-13 20:18:23 -08:00
parent 14c22c63a0
commit 1babcc40ee
19 changed files with 1457 additions and 118 deletions
+24
View File
@@ -48,6 +48,13 @@ enum TaskType {
LASTFM
}
enum FileType {
ALBUM
SONG
AUDIO
USER
}
model RefreshToken {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
token String @unique
@@ -74,6 +81,7 @@ model User {
albumRatings AlbumRating[]
songRatings SongRating[]
refreshTokens RefreshToken[]
files File[]
serverFolderPermissions ServerFolderPermission[]
serverPermissions ServerPermission[]
@@ -85,6 +93,22 @@ model User {
tasks Task[]
}
model File {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
path String @unique
originalName String
fileName String @unique
size Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
type FileType
User User? @relation(fields: [userId], references: [id], onDelete: Cascade)
userId String? @db.Uuid
@@unique(fields: [userId, type], name: "uniqueFileId")
}
model History {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid