mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-18 02:31:19 +10:00
feat(acls): added backend acls
This commit is contained in:
@ -21,3 +21,18 @@ model Invitation {
|
||||
email String?
|
||||
expires DateTime
|
||||
}
|
||||
|
||||
enum APITokenMode {
|
||||
User
|
||||
System
|
||||
}
|
||||
|
||||
model APIToken {
|
||||
token String @id @default(uuid())
|
||||
mode APITokenMode
|
||||
|
||||
userId String?
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
|
||||
acls String[]
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ model CollectionEntry {
|
||||
collection Collection @relation(fields: [collectionId], references: [id], onDelete: Cascade)
|
||||
|
||||
gameId String
|
||||
game Game @relation(fields: [gameId], references: [id])
|
||||
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@id([collectionId, gameId])
|
||||
}
|
||||
|
||||
@ -12,6 +12,8 @@ model User {
|
||||
notifications Notification[]
|
||||
collections Collection[]
|
||||
news News[]
|
||||
|
||||
tokens APIToken[]
|
||||
}
|
||||
|
||||
model Notification {
|
||||
|
||||
Reference in New Issue
Block a user