Deleted old comic and manga models
This commit is contained in:
parent
a07e549ea4
commit
0d4bf113be
2 changed files with 0 additions and 141 deletions
|
|
@ -1,67 +0,0 @@
|
||||||
import { MediaType } from '../utils/MediaType';
|
|
||||||
import type { ModelToData } from '../utils/Utils';
|
|
||||||
import { mediaDbTag, migrateObject } from '../utils/Utils';
|
|
||||||
import { MediaTypeModel } from './MediaTypeModel';
|
|
||||||
|
|
||||||
export type ComicBookData = ModelToData<ComicBookModel>;
|
|
||||||
|
|
||||||
export class ComicBookModel extends MediaTypeModel {
|
|
||||||
creators: string[];
|
|
||||||
publishers: string[];
|
|
||||||
plot: string;
|
|
||||||
issues: number;
|
|
||||||
image: string;
|
|
||||||
onlineRating: number;
|
|
||||||
status: string;
|
|
||||||
released: boolean;
|
|
||||||
publishedFrom: string;
|
|
||||||
publishedTo: string;
|
|
||||||
|
|
||||||
userData: {
|
|
||||||
read: boolean;
|
|
||||||
lastRead: string;
|
|
||||||
personalRating: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
constructor(obj: ComicBookData) {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.creators = [];
|
|
||||||
this.publishers = [];
|
|
||||||
this.plot = '';
|
|
||||||
this.issues = 0;
|
|
||||||
this.image = '';
|
|
||||||
this.onlineRating = 0;
|
|
||||||
|
|
||||||
this.released = false;
|
|
||||||
this.status = '';
|
|
||||||
this.publishedFrom = '';
|
|
||||||
this.publishedTo = '';
|
|
||||||
|
|
||||||
this.userData = {
|
|
||||||
read: false,
|
|
||||||
lastRead: '',
|
|
||||||
personalRating: 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
migrateObject(this, obj, this);
|
|
||||||
|
|
||||||
if (!obj.hasOwnProperty('userData')) {
|
|
||||||
migrateObject(this.userData, obj, this.userData);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.type = this.getMediaType();
|
|
||||||
}
|
|
||||||
|
|
||||||
getTags(): string[] {
|
|
||||||
return [mediaDbTag, 'comicbook'];
|
|
||||||
}
|
|
||||||
|
|
||||||
getMediaType(): MediaType {
|
|
||||||
return MediaType.ComicBook;
|
|
||||||
}
|
|
||||||
|
|
||||||
getSummary(): string {
|
|
||||||
return this.englishTitle + ' (' + this.year + ') - ' + this.publishers;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
import { MediaType } from '../utils/MediaType';
|
|
||||||
import type { ModelToData } from '../utils/Utils';
|
|
||||||
import { mediaDbTag, migrateObject } from '../utils/Utils';
|
|
||||||
import { MediaTypeModel } from './MediaTypeModel';
|
|
||||||
|
|
||||||
export type MangaData = ModelToData<MangaModel>;
|
|
||||||
|
|
||||||
export class MangaModel extends MediaTypeModel {
|
|
||||||
plot: string;
|
|
||||||
alternateTitles: string[];
|
|
||||||
genres: string[];
|
|
||||||
authors: string[];
|
|
||||||
chapters: number;
|
|
||||||
volumes: number;
|
|
||||||
onlineRating: number;
|
|
||||||
image: string;
|
|
||||||
|
|
||||||
released: boolean;
|
|
||||||
status: string;
|
|
||||||
publishers: string[];
|
|
||||||
publishedFrom: string;
|
|
||||||
publishedTo: string;
|
|
||||||
|
|
||||||
userData: {
|
|
||||||
watched: boolean;
|
|
||||||
lastWatched: string;
|
|
||||||
personalRating: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
constructor(obj: MangaData) {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.plot = '';
|
|
||||||
this.alternateTitles = [];
|
|
||||||
this.genres = [];
|
|
||||||
this.authors = [];
|
|
||||||
this.chapters = 0;
|
|
||||||
this.volumes = 0;
|
|
||||||
this.onlineRating = 0;
|
|
||||||
this.image = '';
|
|
||||||
|
|
||||||
this.released = false;
|
|
||||||
this.status = '';
|
|
||||||
this.publishers = [];
|
|
||||||
this.publishedFrom = '';
|
|
||||||
this.publishedTo = '';
|
|
||||||
|
|
||||||
this.userData = {
|
|
||||||
watched: false,
|
|
||||||
lastWatched: '',
|
|
||||||
personalRating: 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
migrateObject(this, obj, this);
|
|
||||||
|
|
||||||
if (!obj.hasOwnProperty('userData')) {
|
|
||||||
migrateObject(this.userData, obj, this.userData);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.type = this.getMediaType();
|
|
||||||
}
|
|
||||||
|
|
||||||
getTags(): string[] {
|
|
||||||
return [mediaDbTag, 'manga', 'light-novel'];
|
|
||||||
}
|
|
||||||
|
|
||||||
getMediaType(): MediaType {
|
|
||||||
return MediaType.Manga;
|
|
||||||
}
|
|
||||||
|
|
||||||
getSummary(): string {
|
|
||||||
return this.title + ' (' + this.year + ')';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue