/**
 * 表单成员模型
 *
 * @export
 * @class FormDetailModel
 */
export class FormDetailModel {

    public caption: string = '';
    public detailType: string = '';
    public name: string = '';
    public visible: boolean = true;
    public isShowCaption: boolean = true;

    constructor(opts: any = {}) {
        this.caption = !Object.is(opts.caption, '') ? opts.caption : '';
        this.detailType = !Object.is(opts.detailType, '') ? opts.detailType : '';
        this.name = !Object.is(opts.name, '') ? opts.name : '';
        this.visible = opts.visible ? true : false;
        this.isShowCaption = opts.isShowCaption ? true : false;
    }

    public setVisible(state: boolean): void {
        this.visible = state;
    }
    public setShowCaption(state: boolean): void {
        this.isShowCaption = state;
    }
}