mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-08-23 23:02:04 +10:00
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:
co-authored by
Robert Clabough
parent
cc3f645580
commit
13891f6ab2
@@ -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")
|
||||
}
|
||||
@@ -22,6 +22,8 @@ model User {
|
||||
saves SaveSlot[]
|
||||
screenshots Screenshot[]
|
||||
playtime Playtime[]
|
||||
|
||||
groups UserGroup[]
|
||||
}
|
||||
|
||||
model Notification {
|
||||
|
||||
Reference in New Issue
Block a user