Files
drop/server/prisma/models/user.prisma
T
AgentScrubblesandRobert Clabough 13891f6ab2 Adding groups logic and restrictions (#454)
* Adding groups logic and restrictions

* Cleaning up some redundant code

* hastily made translations

* Linter issues

* More linting

* PR comments

* Covering other APIs with age filters per comment

---------

Co-authored-by: Robert Clabough <robert@clabough.tech>
2026-08-02 11:50:15 +10:00

47 lines
986 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[]
mfas LinkedMFAMec[]
clients Client[]
notifications Notification[]
collections Collection[]
articles Article[]
tokens APIToken[]
sessions Session[]
saves SaveSlot[]
screenshots Screenshot[]
playtime Playtime[]
groups UserGroup[]
}
model Notification {
id String @id @default(uuid())
nonce String?
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
acls String[]
created DateTime @default(now())
title String
description String
actions String[]
read Boolean @default(false)
@@unique([userId, nonce])
}