From 2e9be64612006c7152a1dde6192466eebb04dd7f Mon Sep 17 00:00:00 2001 From: zkldi Date: Tue, 27 Apr 2021 16:10:29 +0100 Subject: [PATCH] Migrate versionstats to AnyChartDoc --- common/js/types.d.ts | 10 +++------- common/src/types.ts | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/common/js/types.d.ts b/common/js/types.d.ts index 2fd8b7aa0..b578bd037 100644 --- a/common/js/types.d.ts +++ b/common/js/types.d.ts @@ -570,6 +570,7 @@ interface ChartDocumentData { }; } export interface AnyChartDocument extends MongoDBDocument { + isRemoved: boolean; chartID: string; rgcID: string | null; songID: integer; @@ -579,7 +580,8 @@ export interface AnyChartDocument extends MongoDBDocument { bpmString: string | null; difficulty: Difficulties[IDStrings]; playtype: Playtypes[Game]; - isRemoved: boolean; + isPrimary: boolean; + versions: string[]; } export interface ChartDocument extends AnyChartDocument { difficulty: Difficulties[I]; @@ -677,7 +679,6 @@ export interface AnySongDocument extends MongoDBDocument { id: integer; title: string; artist: string; - isAvailable: boolean; firstVersion: string | null; /** * Alternative names for this song, to be used while searching. @@ -688,11 +689,6 @@ export interface AnySongDocument extends MongoDBDocument { * requested. */ "alt-titles": string[]; - /** - * Contains the versions this song appeared in. This is used for - * disambiguation in some games. - */ - versions: string[]; } export interface SongDocument extends AnySongDocument { data: SongDocumentData[G]; diff --git a/common/src/types.ts b/common/src/types.ts index d739b03dc..75e1ed928 100644 --- a/common/src/types.ts +++ b/common/src/types.ts @@ -754,6 +754,7 @@ interface ChartDocumentData { } export interface AnyChartDocument extends MongoDBDocument { + isRemoved: boolean; chartID: string; rgcID: string | null; // ID to perform backbeat lookup in future. songID: integer; @@ -763,7 +764,8 @@ export interface AnyChartDocument extends MongoDBDocument { bpmString: string | null; difficulty: Difficulties[IDStrings]; playtype: Playtypes[Game]; - isRemoved: boolean; + isPrimary: boolean; + versions: string[]; } export interface ChartDocument extends AnyChartDocument { @@ -851,7 +853,6 @@ export interface AnySongDocument extends MongoDBDocument { id: integer; title: string; artist: string; - isAvailable: boolean; firstVersion: string | null; /** * Alternative names for this song, to be used while searching. @@ -862,11 +863,6 @@ export interface AnySongDocument extends MongoDBDocument { * requested. */ "alt-titles": string[]; - /** - * Contains the versions this song appeared in. This is used for - * disambiguation in some games. - */ - versions: string[]; } export interface SongDocument extends AnySongDocument {