2018-02-02 11:57:24 +01:00
|
|
|
import { BaseModel } from '../BaseModel';
|
|
|
|
import { FormGenerator } from '../interfaces/FormGenerator';
|
|
|
|
import { Serializable } from '../interfaces/Serializable';
|
2018-10-05 17:00:54 +02:00
|
|
|
import { FormGroup } from '@angular/forms';
|
|
|
|
export abstract class DataField<T> extends BaseModel implements Serializable<T>, FormGenerator<FormGroup> {
|
|
|
|
public label: string;
|
2018-02-02 11:57:24 +01:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
buildForm(): FormGroup {
|
|
|
|
throw new Error('Build Form Is not not correctly overriden');
|
|
|
|
}
|
2018-02-02 11:57:24 +01:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
fromJSONObject(item: any): T {
|
|
|
|
throw new Error('From Json Object is not correctly overriden');
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|