big changes; we have a good TS config now

This commit is contained in:
Moritz Jung 2025-01-14 22:30:28 +01:00
parent cbbaf54b33
commit 4497991344
54 changed files with 750 additions and 671 deletions

View file

@ -1,35 +1,28 @@
import { MediaTypeModel } from './MediaTypeModel';
import { mediaDbTag, migrateObject } from '../utils/Utils';
import { MediaType } from '../utils/MediaType';
import { mediaDbTag, migrateObject, type ModelToData } from '../utils/Utils';
import { MediaTypeModel } from './MediaTypeModel';
export type MusicReleaseData = ModelToData<MusicReleaseModel>;
export class MusicReleaseModel extends MediaTypeModel {
type: string;
subType: string;
title: string;
englishTitle: string;
year: string;
dataSource: string;
url: string;
id: string;
image: string;
genres: string[];
artists: string[];
image: string;
rating: number;
userData: {
personalRating: number;
};
constructor(obj: any = {}) {
constructor(obj: MusicReleaseData) {
super();
this.genres = undefined;
this.artists = undefined;
this.image = undefined;
this.rating = undefined;
this.genres = [];
this.artists = [];
this.image = '';
this.rating = 0;
this.userData = {
personalRating: undefined,
personalRating: 0,
};
migrateObject(this, obj, this);