2018-09-13 09:23:57 +02:00
|
|
|
import { BaseModel } from '../shared/models/base/base-model';
|
|
|
|
import { Displayable } from '../shared/models/base/displayable';
|
2018-09-10 15:53:11 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Base class for view models. alls view models should have titles.
|
|
|
|
*/
|
2018-09-13 09:23:57 +02:00
|
|
|
export abstract class BaseViewModel implements Displayable {
|
2018-09-10 15:53:11 +02:00
|
|
|
public abstract updateValues(update: BaseModel): void;
|
|
|
|
|
2018-09-13 09:23:57 +02:00
|
|
|
public abstract getTitle(): string;
|
2018-09-10 15:53:11 +02:00
|
|
|
|
2018-09-13 09:23:57 +02:00
|
|
|
public getListTitle(): string {
|
|
|
|
return this.getTitle();
|
2018-09-10 15:53:11 +02:00
|
|
|
}
|
|
|
|
|
2018-09-13 09:23:57 +02:00
|
|
|
public toString(): string {
|
|
|
|
return this.getTitle();
|
2018-09-10 15:53:11 +02:00
|
|
|
}
|
|
|
|
}
|