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>
This commit is contained in:
AgentScrubbles
2026-08-02 11:50:15 +10:00
committed by GitHub
co-authored by Robert Clabough
parent cc3f645580
commit 13891f6ab2
30 changed files with 1232 additions and 38 deletions
+23
View File
@@ -0,0 +1,23 @@
model UserGroup {
id String @id @default(uuid())
name String @unique
description String @default("")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
users User[]
bannedAgeRatings BannedAgeRating[]
}
model BannedAgeRating {
id String @id @default(uuid())
organization AgeRatingOrganization
rating String
userGroup UserGroup @relation(fields: [userGroupId], references: [id], onDelete: Cascade)
userGroupId String
@@unique([userGroupId, organization, rating], name: "groupRatingKey")
}
+2
View File
@@ -22,6 +22,8 @@ model User {
saves SaveSlot[]
screenshots Screenshot[]
playtime Playtime[]
groups UserGroup[]
}
model Notification {