import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { MonitorHistory } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-09-15 13:26
 */
interface MonitorHistoryCU extends ConditionUtil<MonitorHistoryCU>{
    ID:FieldUtil<MonitorHistoryCU>;
    TEMPLATE_ID:FieldUtil<MonitorHistoryCU>;
    SETTING_ID:FieldUtil<MonitorHistoryCU>;
    ACTUAL_ALERT_VALUE:FieldUtil<MonitorHistoryCU>;
    ACTUAL_ALERT_VALUE_UNIT:FieldUtil<MonitorHistoryCU>;
    ALERT_TIME:FieldUtil<MonitorHistoryCU>;
    ALARM_LEVEL:FieldUtil<MonitorHistoryCU>;
    NOTIFIED:FieldUtil<MonitorHistoryCU>;
    CREATE_TIME:FieldUtil<MonitorHistoryCU>;
    UPDATE_TIME:FieldUtil<MonitorHistoryCU>;
    MS_TYPE:FieldUtil<MonitorHistoryCU>;
}

class MonitorHistoryCUImpl extends ConditionUtilImpl<MonitorHistoryCUImpl> implements MonitorHistoryCU{ 
    newInstance(): MonitorHistoryCUImpl {
        return new MonitorHistoryCUImpl();
    } 
    get ID(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get TEMPLATE_ID(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('template_id','templateId','模板id', this);
    }
    get SETTING_ID(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('setting_id','settingId','规则设置id', this);
    }
    get ACTUAL_ALERT_VALUE(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('actual_alert_value','actualAlertValue','实际告警值', this);
    }
    get ACTUAL_ALERT_VALUE_UNIT(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('actual_alert_value_unit','actualAlertValueUnit','实际告警值单位', this);
    }
    get ALERT_TIME(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('alert_time','alertTime','告警时间', this);
    }
    get ALARM_LEVEL(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('alarm_level','alarmLevel','报警级别', this);
    }
    get NOTIFIED(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('notified','notified','是否已通知', this);
    }
    get CREATE_TIME(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('create_time','createTime','create_time', this);
    }
    get UPDATE_TIME(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('update_time','updateTime','update_time', this);
    }
    get MS_TYPE(): FieldUtil<MonitorHistoryCU>{  
        return new FieldUtil('ms_type','msType','日志类型（MMS-中台；FMS-前台；SMS-独立服务）', this);
    }
}

@Singleton 
class MonitorHistoryMU extends TableUtilImpl<MonitorHistoryCU,MonitorHistory>{ 
    tableName  = 'monitor_history';
    tableFields  = ['id','template_id','setting_id','actual_alert_value','actual_alert_value_unit','alert_time','alarm_level','notified','create_time','update_time','ms_type'];
    modelFields  = ['id','templateId','settingId','actualAlertValue','actualAlertValueUnit','alertTime','alarmLevel','notified','createTime','updateTime','msType'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MonitorHistoryCU {
        return new MonitorHistoryCUImpl();
    }   

    static get ID(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('id','id','主键', new MonitorHistoryCUImpl());
    }
    static get TEMPLATE_ID(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('template_id','templateId','模板id', new MonitorHistoryCUImpl());
    }
    static get SETTING_ID(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('setting_id','settingId','规则设置id', new MonitorHistoryCUImpl());
    }
    static get ACTUAL_ALERT_VALUE(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('actual_alert_value','actualAlertValue','实际告警值', new MonitorHistoryCUImpl());
    }
    static get ACTUAL_ALERT_VALUE_UNIT(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('actual_alert_value_unit','actualAlertValueUnit','实际告警值单位', new MonitorHistoryCUImpl());
    }
    static get ALERT_TIME(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('alert_time','alertTime','告警时间', new MonitorHistoryCUImpl());
    }
    static get ALARM_LEVEL(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('alarm_level','alarmLevel','报警级别', new MonitorHistoryCUImpl());
    }
    static get NOTIFIED(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('notified','notified','是否已通知', new MonitorHistoryCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('create_time','createTime','create_time', new MonitorHistoryCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('update_time','updateTime','update_time', new MonitorHistoryCUImpl());
    }
    static get MS_TYPE(): FieldUtil<MonitorHistoryCU>{ 
        return new FieldUtil('ms_type','msType','日志类型（MMS-中台；FMS-前台；SMS-独立服务）', new MonitorHistoryCUImpl());
    }

    get ID(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.ID;
    }
    get TEMPLATE_ID(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.TEMPLATE_ID;
    }
    get SETTING_ID(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.SETTING_ID;
    }
    get ACTUAL_ALERT_VALUE(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.ACTUAL_ALERT_VALUE;
    }
    get ACTUAL_ALERT_VALUE_UNIT(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.ACTUAL_ALERT_VALUE_UNIT;
    }
    get ALERT_TIME(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.ALERT_TIME;
    }
    get ALARM_LEVEL(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.ALARM_LEVEL;
    }
    get NOTIFIED(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.NOTIFIED;
    }
    get CREATE_TIME(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.UPDATE_TIME;
    }
    get MS_TYPE(): FieldUtil<MonitorHistoryCU>{ 
        return MonitorHistoryMU.MS_TYPE;
    }
}
export {MonitorHistoryMU, MonitorHistoryCU}
