Files
drop/prisma/models/user.prisma
Huskydog9988 9d2aded70f feat: add acl to notifications
not sure if i got all the acls of the different notifications down rn, but it seems to be about right
2025-05-14 22:53:09 -04:00

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])
}