2019-03-01 06:13:37 +01:00
|
|
|
import { BaseResponse } from '../response/baseResponse';
|
|
|
|
|
2018-03-02 05:44:29 +01:00
|
|
|
import { FieldType } from '../../enums/fieldType';
|
2021-11-02 23:03:37 +01:00
|
|
|
import { LinkedIdType } from '../../enums/linkedIdType';
|
2018-03-02 05:44:29 +01:00
|
|
|
|
2019-03-01 06:13:37 +01:00
|
|
|
export class FieldApi extends BaseResponse {
|
2018-03-02 05:44:29 +01:00
|
|
|
name: string;
|
|
|
|
value: string;
|
|
|
|
type: FieldType;
|
2021-11-02 23:03:37 +01:00
|
|
|
linkedId: LinkedIdType;
|
2018-03-02 05:44:29 +01:00
|
|
|
|
2019-03-01 06:13:37 +01:00
|
|
|
constructor(data: any = null) {
|
|
|
|
super(data);
|
|
|
|
if (data == null) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.type = this.getResponseProperty('Type');
|
|
|
|
this.name = this.getResponseProperty('Name');
|
|
|
|
this.value = this.getResponseProperty('Value');
|
2021-11-02 23:03:37 +01:00
|
|
|
this.linkedId = this.getResponseProperty('linkedId');
|
2018-03-02 05:44:29 +01:00
|
|
|
}
|
|
|
|
}
|