Phase5
This commit is contained in:
@@ -96,6 +96,22 @@ enum WorldUploadStatus {
|
||||
FAILED
|
||||
}
|
||||
|
||||
enum AddonType {
|
||||
PLUGIN
|
||||
MOD
|
||||
MODPACK
|
||||
DATAPACK
|
||||
}
|
||||
|
||||
enum AddonInstallStatus {
|
||||
PENDING
|
||||
INSTALLING
|
||||
INSTALLED
|
||||
FAILED
|
||||
REMOVING
|
||||
REMOVED
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(uuid())
|
||||
email String @unique
|
||||
@@ -265,6 +281,7 @@ model GameServer {
|
||||
backupRestores BackupRestore[]
|
||||
backupSchedule BackupSchedule?
|
||||
worldUploads WorldUpload[]
|
||||
installedAddons InstalledAddon[]
|
||||
|
||||
@@index([userId])
|
||||
@@index([nodeId])
|
||||
@@ -502,3 +519,30 @@ model WorldUpload {
|
||||
@@index([status])
|
||||
@@map("world_uploads")
|
||||
}
|
||||
|
||||
model InstalledAddon {
|
||||
id String @id @default(uuid())
|
||||
serverId String
|
||||
provider String @default("modrinth")
|
||||
projectId String
|
||||
projectSlug String
|
||||
projectName String
|
||||
versionId String
|
||||
versionNumber String
|
||||
addonType AddonType
|
||||
fileName String
|
||||
filePath String
|
||||
fileSha512 String?
|
||||
status AddonInstallStatus @default(PENDING)
|
||||
failureReason String?
|
||||
installedAt DateTime? @db.Timestamptz(3)
|
||||
createdAt DateTime @default(now()) @db.Timestamptz(3)
|
||||
updatedAt DateTime @updatedAt @db.Timestamptz(3)
|
||||
|
||||
server GameServer @relation(fields: [serverId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([serverId, projectId, versionId])
|
||||
@@index([serverId])
|
||||
@@index([status])
|
||||
@@map("installed_addons")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user