games, english anime titles, specials and OVAs
This commit is contained in:
parent
c400b7abf5
commit
d2afe3bcc2
10 changed files with 141 additions and 42 deletions
39
src/models/GameModel.ts
Normal file
39
src/models/GameModel.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import {MediaTypeModel} from './MediaTypeModel';
|
||||
import {stringifyYaml} from 'obsidian';
|
||||
|
||||
|
||||
export class GameModel extends MediaTypeModel {
|
||||
type: string;
|
||||
title: string;
|
||||
englishTitle: string;
|
||||
year: string;
|
||||
dataSource: string;
|
||||
url: string;
|
||||
id: string;
|
||||
|
||||
genres: string[];
|
||||
onlineRating: number;
|
||||
image: string;
|
||||
|
||||
released: boolean;
|
||||
releaseDate: string;
|
||||
|
||||
played: boolean;
|
||||
personalRating: number;
|
||||
|
||||
|
||||
constructor(obj: any = {}) {
|
||||
super();
|
||||
|
||||
Object.assign(this, obj);
|
||||
}
|
||||
|
||||
toMetaData(): string {
|
||||
return stringifyYaml(this);
|
||||
}
|
||||
|
||||
getFileName(): string {
|
||||
return this.title + (this.year ? ` (${this.year})` : '');
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue