mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-27 12:51:03 +00:00
feat: refactor game achievement table
This commit is contained in:
@@ -1,20 +1,15 @@
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
OneToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
} from "typeorm";
|
||||
import type { Game } from "./game.entity";
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity("game_achievement")
|
||||
export class GameAchievement {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@OneToOne("Game", "achievements")
|
||||
@JoinColumn()
|
||||
game: Game;
|
||||
@Column("text")
|
||||
objectId: string;
|
||||
|
||||
@Column("text")
|
||||
shop: string;
|
||||
|
||||
@Column("text", { nullable: true })
|
||||
unlockedAchievements: string;
|
||||
|
||||
@@ -12,7 +12,6 @@ import { Repack } from "./repack.entity";
|
||||
import type { GameShop, GameStatus } from "@types";
|
||||
import { Downloader } from "@shared";
|
||||
import type { DownloadQueue } from "./download-queue.entity";
|
||||
import { GameAchievement } from "./game-achievements.entity";
|
||||
|
||||
@Entity("game")
|
||||
export class Game {
|
||||
@@ -77,9 +76,6 @@ export class Game {
|
||||
@JoinColumn()
|
||||
repack: Repack;
|
||||
|
||||
@OneToOne("GameAchievement", "game")
|
||||
achievements: GameAchievement;
|
||||
|
||||
@OneToOne("DownloadQueue", "game")
|
||||
downloadQueue: DownloadQueue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user