mirror of
https://github.com/BillyOutlast/drop.git
synced 2026-02-04 00:31:17 +01:00
* feat: nginx + torrential basics & services system * fix: lint + i18n * fix: update torrential to remove openssl * feat: add torrential to Docker build * feat: move to self hosted runner * fix: move off self-hosted runner * fix: update nginx.conf * feat: torrential cache invalidation * fix: update torrential for cache invalidation * feat: integrity check task * fix: lint * feat: move to version ids * fix: client fixes and client-side checks * feat: new depot apis and version id fixes * feat: update torrential * feat: droplet bump and remove unsafe update functions * fix: lint * feat: v4 featureset: emulators, multi-launch commands * fix: lint * fix: mobile ui for game editor * feat: launch options * fix: lint * fix: remove axios, use $fetch * feat: metadata and task api improvements * feat: task actions * fix: slight styling issue * feat: fix style and lints * feat: totp backend routes * feat: oidc groups * fix: update drop-base * feat: creation of passkeys & totp * feat: totp signin * feat: webauthn mfa/signin * feat: launch selecting ui * fix: manually running tasks * feat: update add company game modal to use new SelectorGame * feat: executor selector * fix(docker): update rust to rust nightly for torrential build (#305) * feat: new version ui * feat: move package lookup to build time to allow for deno dev * fix: lint * feat: localisation cleanup * feat: apply localisation cleanup * feat: potential i18n refactor logic * feat: remove args from commands * fix: lint * fix: lockfile --------- Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com>
219 lines
5.4 KiB
Plaintext
219 lines
5.4 KiB
Plaintext
enum MetadataSource {
|
|
Manual
|
|
GiantBomb
|
|
Steam
|
|
PCGamingWiki
|
|
IGDB
|
|
Metacritic
|
|
OpenCritic
|
|
}
|
|
|
|
model Game {
|
|
id String @id @default(uuid())
|
|
|
|
metadataSource MetadataSource
|
|
metadataId String
|
|
created DateTime @default(now())
|
|
|
|
// Any field prefixed with m is filled in from metadata
|
|
// Acts as a cache so we can search and filter it
|
|
mName String // Name of game
|
|
|
|
mShortDescription String // Short description
|
|
mDescription String // Supports markdown
|
|
mReleased DateTime // When the game was released
|
|
|
|
ratings GameRating[]
|
|
|
|
featured Boolean @default(false)
|
|
|
|
mIconObjectId String // linked to objects in s3
|
|
mBannerObjectId String // linked to objects in s3
|
|
mCoverObjectId String
|
|
mImageCarouselObjectIds String[] // linked to below array
|
|
mImageLibraryObjectIds String[] // linked to objects in s3
|
|
|
|
versions GameVersion[]
|
|
|
|
// These fields will not be optional in the next version
|
|
// Any game without a library ID will be assigned one at startup, based on the defaults
|
|
libraryId String
|
|
library Library @relation(fields: [libraryId], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
libraryPath String
|
|
|
|
collections CollectionEntry[]
|
|
saves SaveSlot[]
|
|
screenshots Screenshot[]
|
|
tags GameTag[]
|
|
playtime Playtime[]
|
|
|
|
developers Company[] @relation(name: "developers")
|
|
publishers Company[] @relation(name: "publishers")
|
|
|
|
@@unique([metadataSource, metadataId], name: "metadataKey")
|
|
@@unique([libraryId, libraryPath], name: "libraryKey")
|
|
@@index([mName(ops: raw("gist_trgm_ops(siglen=32)"))], type: Gist)
|
|
}
|
|
|
|
model GameTag {
|
|
id String @id @default(uuid())
|
|
name String @unique
|
|
|
|
games Game[]
|
|
|
|
@@index([name(ops: raw("gist_trgm_ops(siglen=32)"))], type: Gist)
|
|
}
|
|
|
|
model GameRating {
|
|
id String @id @default(uuid())
|
|
|
|
metadataSource MetadataSource
|
|
metadataId String
|
|
created DateTime @default(now())
|
|
|
|
mReviewCount Int
|
|
mReviewRating Float // 0 to 1
|
|
|
|
mReviewHref String?
|
|
|
|
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
|
|
gameId String
|
|
|
|
@@unique([metadataSource, metadataId], name: "metadataKey")
|
|
}
|
|
|
|
// A particular set of files that relate to the version
|
|
model GameVersion {
|
|
gameId String
|
|
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
|
|
versionId String @default(uuid())
|
|
|
|
displayName String?
|
|
versionPath String
|
|
|
|
created DateTime @default(now())
|
|
|
|
launches LaunchConfiguration[]
|
|
setups SetupConfiguration[]
|
|
|
|
onlySetup Boolean @default(false)
|
|
|
|
dropletManifest Json // Results from droplet
|
|
|
|
versionIndex Int
|
|
delta Boolean @default(false)
|
|
|
|
@@id([gameId, versionId])
|
|
}
|
|
|
|
model SetupConfiguration {
|
|
setupId String @id @default(uuid())
|
|
|
|
command String
|
|
|
|
platform Platform
|
|
|
|
gameId String
|
|
versionId String
|
|
gameVersion GameVersion @relation(fields: [gameId, versionId], references: [gameId, versionId], onDelete: Cascade, onUpdate: Cascade)
|
|
}
|
|
|
|
model LaunchConfiguration {
|
|
launchId String @id @default(uuid())
|
|
|
|
name String
|
|
|
|
command String
|
|
|
|
platform Platform
|
|
|
|
// For emulation targets
|
|
executorId String?
|
|
executor LaunchConfiguration? @relation(fields: [executorId], references: [launchId], name: "executor", onDelete: Cascade, onUpdate: Cascade)
|
|
|
|
umuIdOverride String?
|
|
|
|
gameId String
|
|
versionId String
|
|
gameVersion GameVersion @relation(fields: [gameId, versionId], references: [gameId, versionId], onDelete: Cascade, onUpdate: Cascade)
|
|
|
|
executions LaunchConfiguration[] @relation("executor")
|
|
}
|
|
|
|
// A save slot for a game
|
|
model SaveSlot {
|
|
gameId String
|
|
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
|
|
userId String
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
index Int
|
|
|
|
createdAt DateTime @default(now())
|
|
playtime Float @default(0) // hours
|
|
|
|
lastUsedClientId String?
|
|
lastUsedClient Client? @relation(fields: [lastUsedClientId], references: [id])
|
|
|
|
historyObjectIds String[] // list of objects
|
|
historyChecksums String[] // list of hashes
|
|
|
|
@@id([gameId, userId, index], name: "id")
|
|
}
|
|
|
|
model Screenshot {
|
|
id String @id @default(uuid())
|
|
|
|
gameId String
|
|
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
|
|
userId String
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
objectId String
|
|
private Boolean // if other users can see
|
|
|
|
createdAt DateTime @default(now()) @db.Timestamptz(0)
|
|
|
|
@@index([gameId, userId])
|
|
@@index([userId])
|
|
}
|
|
|
|
model Playtime {
|
|
gameId String
|
|
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
|
|
userId String
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
seconds Int // seconds user has spent playing the game
|
|
|
|
updatedAt DateTime @updatedAt @db.Timestamptz(6)
|
|
createdAt DateTime @default(now()) @db.Timestamptz(6)
|
|
|
|
@@id([gameId, userId])
|
|
@@index([userId])
|
|
}
|
|
|
|
model Company {
|
|
id String @id @default(uuid())
|
|
|
|
metadataSource MetadataSource
|
|
metadataId String
|
|
metadataOriginalQuery String
|
|
|
|
mName String
|
|
mShortDescription String
|
|
mDescription String
|
|
mLogoObjectId String
|
|
mBannerObjectId String
|
|
mWebsite String
|
|
|
|
developed Game[] @relation(name: "developers")
|
|
published Game[] @relation(name: "publishers")
|
|
|
|
@@unique([metadataSource, metadataId], name: "metadataKey")
|
|
}
|
|
|
|
model ObjectHash {
|
|
id String @id
|
|
hash String
|
|
}
|