Added ability to control registration by admin user.
This commit is contained in:
parent
2ab11f7a4b
commit
9f4204cc73
18 changed files with 1238 additions and 28 deletions
|
|
@ -15,6 +15,8 @@ model User {
|
|||
screenName String?
|
||||
avatarUrl String?
|
||||
unitPreference UnitPreference @default(METRIC)
|
||||
isAdmin Boolean @default(false)
|
||||
isApiEnabled Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
games Game[] @relation("GameMaster")
|
||||
|
|
@ -22,6 +24,7 @@ model User {
|
|||
captainOf Team? @relation("TeamCaptain")
|
||||
chatMessages ChatMessage[]
|
||||
locationHistory LocationHistory[]
|
||||
apiKeys ApiKey[]
|
||||
}
|
||||
|
||||
enum UnitPreference {
|
||||
|
|
@ -158,6 +161,32 @@ model LocationHistory {
|
|||
recordedAt DateTime @default(now())
|
||||
}
|
||||
|
||||
model SystemSettings {
|
||||
id String @id @default("default")
|
||||
registrationEnabled Boolean @default(true)
|
||||
inviteCode String? @unique
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model BannedEmail {
|
||||
id String @id @default(uuid())
|
||||
email String @unique
|
||||
reason String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model ApiKey {
|
||||
id String @id @default(uuid())
|
||||
key String @unique
|
||||
name String
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
expiresAt DateTime?
|
||||
lastUsed DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
enum Visibility {
|
||||
PUBLIC
|
||||
PRIVATE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue