2017-11-23 11:40:02 +01:00
|
|
|
import { BaseModel } from './BaseModel';
|
|
|
|
import { FormGroup } from '@angular/forms';
|
|
|
|
import { FormGenerator } from './interfaces/FormGenerator';
|
|
|
|
import { Serializable } from './interfaces/Serializable';
|
2018-10-05 17:00:54 +02:00
|
|
|
export class Rule extends BaseModel implements Serializable<Rule> {
|
|
|
|
public sourceField: string;
|
|
|
|
public targetField: string;
|
|
|
|
public requiredValue;
|
|
|
|
public type: string;
|
2017-11-23 11:40:02 +01:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
fromJSONObject(item: any): Rule {
|
|
|
|
this.sourceField = item.sourceField;
|
|
|
|
this.targetField = item.targetField;
|
|
|
|
this.requiredValue = item.requiredValue;
|
|
|
|
this.type = item.type;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|