mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-16 17:51:17 +10:00
not sure if i got all the acls of the different notifications down rn, but it seems to be about right
44 lines
928 B
Plaintext
44 lines
928 B
Plaintext
model User {
|
|
id String @id @default(uuid())
|
|
username String @unique
|
|
admin Boolean @default(false)
|
|
enabled Boolean @default(true)
|
|
|
|
email String
|
|
displayName String
|
|
profilePictureObjectId String // Object
|
|
|
|
authMecs LinkedAuthMec[]
|
|
clients Client[]
|
|
notifications Notification[]
|
|
collections Collection[]
|
|
articles Article[]
|
|
|
|
tokens APIToken[]
|
|
sessions Session[]
|
|
|
|
saves SaveSlot[]
|
|
screenshots Screenshot[]
|
|
}
|
|
|
|
model Notification {
|
|
id String @id @default(uuid())
|
|
|
|
nonce String?
|
|
|
|
userId String
|
|
user User @relation(fields: [userId], references: [id])
|
|
|
|
created DateTime @default(now())
|
|
title String
|
|
description String
|
|
actions String[]
|
|
|
|
// ACL items
|
|
requiredPerms String[] @default([])
|
|
|
|
read Boolean @default(false)
|
|
|
|
@@unique([userId, nonce])
|
|
}
|