feat: migrating games to leveldb

This commit is contained in:
Chubby Granny Chaser
2025-01-19 17:59:39 +00:00
parent c115040e90
commit 1f0e195854
34 changed files with 410 additions and 343 deletions

View File

@@ -1,4 +1,10 @@
import type { SteamAchievement, UnlockedAchievement } from "./game.types";
import type { Downloader } from "@shared";
import type {
GameShop,
GameStatus,
SteamAchievement,
UnlockedAchievement,
} from "./game.types";
export type SubscriptionStatus = "active" | "pending" | "cancelled";
@@ -24,6 +30,37 @@ export interface User {
subscription: Subscription | null;
}
export interface Game {
title: string;
iconUrl: string | null;
status: GameStatus | null;
playTimeInMilliseconds: number;
lastTimePlayed: Date | null;
objectId: string;
shop: GameShop;
remoteId: string | null;
isDeleted: boolean;
winePrefixPath?: string | null;
executablePath?: string | null;
launchOptions?: string | null;
}
export interface Download {
shop: GameShop;
objectId: string;
uri: string;
folderName: string;
downloadPath: string;
progress: number;
downloader: Downloader;
bytesDownloaded: number;
playTimeInMilliseconds: number;
lastTimePlayed: Date | null;
fileSize: number;
shouldSeed: boolean;
timestamp: number;
}
export interface GameAchievement {
achievements: SteamAchievement[];
unlockedAchievements: UnlockedAchievement[];