Updated list of commands to v4.3. Added groups & permissions. Added connections. Updated redemptions and actions to v4.3.
This commit is contained in:
@ -33,12 +33,17 @@ model User {
|
||||
apiKeys ApiKey[]
|
||||
accounts Account[]
|
||||
twitchConnections TwitchConnection[]
|
||||
Connection Connection[]
|
||||
ConnectionState ConnectionState[]
|
||||
ttsUsernameFilter TtsUsernameFilter[]
|
||||
ttsWordFilter TtsWordFilter[]
|
||||
ttsChatVoices TtsChatVoice[]
|
||||
ttsVoiceStates TtsVoiceState[]
|
||||
actions Action[]
|
||||
redemptions Redemption[]
|
||||
groups Group[]
|
||||
chatterGroups ChatterGroup[]
|
||||
groupPermissions GroupPermission[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
@ -92,6 +97,36 @@ model TwitchConnection {
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
||||
}
|
||||
|
||||
model Connection {
|
||||
name String
|
||||
type String
|
||||
clientId String
|
||||
accessToken String
|
||||
grantType String
|
||||
scope String
|
||||
expiresAt DateTime
|
||||
default Boolean @default(false)
|
||||
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
||||
|
||||
@@id([userId, name])
|
||||
}
|
||||
|
||||
model ConnectionState {
|
||||
state String
|
||||
name String
|
||||
type String
|
||||
grantType String
|
||||
clientId String
|
||||
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
||||
|
||||
@@id([userId, name])
|
||||
@@unique([state])
|
||||
}
|
||||
|
||||
model TtsUsernameFilter {
|
||||
username String
|
||||
tag String
|
||||
@ -144,6 +179,50 @@ model TtsVoiceState {
|
||||
@@id([userId, ttsVoiceId])
|
||||
}
|
||||
|
||||
model Group {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
userId String
|
||||
name String
|
||||
priority Int
|
||||
|
||||
chatters ChatterGroup[]
|
||||
permissions GroupPermission[]
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, name])
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model ChatterGroup {
|
||||
//id String @id @default(uuid()) @db.Uuid
|
||||
userId String
|
||||
groupId String @db.Uuid
|
||||
chatterId BigInt
|
||||
chatterLabel String
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@id([userId, groupId, chatterId])
|
||||
@@unique([userId, groupId, chatterId])
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model GroupPermission {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
userId String
|
||||
groupId String @db.Uuid
|
||||
path String
|
||||
allow Boolean?
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, groupId, path])
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model Chatter {
|
||||
id BigInt
|
||||
name String
|
||||
@ -161,6 +240,7 @@ model Emote {
|
||||
//history EmoteUsageHistory[]
|
||||
|
||||
@@id([id])
|
||||
@@unique([id, name])
|
||||
}
|
||||
|
||||
model EmoteUsageHistory {
|
||||
@ -180,20 +260,34 @@ enum ActionType {
|
||||
APPEND_TO_FILE
|
||||
AUDIO_FILE
|
||||
OBS_TRANSFORM
|
||||
RANDOM_TTS_VOICE
|
||||
SPECIFIC_TTS_VOICE
|
||||
TOGGLE_OBS_VISIBILITY
|
||||
SPECIFIC_OBS_VISIBILITY
|
||||
SPECIFIC_OBS_INDEX
|
||||
SLEEP
|
||||
OAUTH
|
||||
NIGHTBOT_PLAY
|
||||
NIGHTBOT_PAUSE
|
||||
NIGHTBOT_SKIP
|
||||
NIGHTBOT_CLEAR_PLAYLIST
|
||||
NIGHTBOT_CLEAR_QUEUE
|
||||
TWITCH_OAUTH
|
||||
}
|
||||
|
||||
model Action {
|
||||
userId String
|
||||
name String @unique
|
||||
name String @unique
|
||||
type ActionType
|
||||
data Json
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@id([userId, name])
|
||||
}
|
||||
|
||||
model Redemption {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
userId String
|
||||
redemptionId String
|
||||
actionName String
|
||||
|
Reference in New Issue
Block a user