import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { MonitorRuleRunLog } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-09-13 14:19
 */
interface MonitorRuleRunLogCU extends ConditionUtil<MonitorRuleRunLogCU>{
    ID:FieldUtil<MonitorRuleRunLogCU>;
    SETTING_ID:FieldUtil<MonitorRuleRunLogCU>;
    LAST_RUN_LOG:FieldUtil<MonitorRuleRunLogCU>;
    NEXT_RUN_LOG:FieldUtil<MonitorRuleRunLogCU>;
    ERROR_COUNT:FieldUtil<MonitorRuleRunLogCU>;
    CREATE_TIME:FieldUtil<MonitorRuleRunLogCU>;
    UPDATE_TIME:FieldUtil<MonitorRuleRunLogCU>;
}

class MonitorRuleRunLogCUImpl extends ConditionUtilImpl<MonitorRuleRunLogCUImpl> implements MonitorRuleRunLogCU{ 
    newInstance(): MonitorRuleRunLogCUImpl {
        return new MonitorRuleRunLogCUImpl();
    } 
    get ID(): FieldUtil<MonitorRuleRunLogCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get SETTING_ID(): FieldUtil<MonitorRuleRunLogCU>{  
        return new FieldUtil('setting_id','settingId','监控设置ID', this);
    }
    get LAST_RUN_LOG(): FieldUtil<MonitorRuleRunLogCU>{  
        return new FieldUtil('last_run_log','lastRunLog','最后执行时间', this);
    }
    get NEXT_RUN_LOG(): FieldUtil<MonitorRuleRunLogCU>{  
        return new FieldUtil('next_run_log','nextRunLog','下次执行时间', this);
    }
    get ERROR_COUNT(): FieldUtil<MonitorRuleRunLogCU>{  
        return new FieldUtil('error_count','errorCount','持续异常次数', this);
    }
    get CREATE_TIME(): FieldUtil<MonitorRuleRunLogCU>{  
        return new FieldUtil('create_time','createTime','create_time', this);
    }
    get UPDATE_TIME(): FieldUtil<MonitorRuleRunLogCU>{  
        return new FieldUtil('update_time','updateTime','update_time', this);
    }
}

@Singleton 
class MonitorRuleRunLogMU extends TableUtilImpl<MonitorRuleRunLogCU,MonitorRuleRunLog>{ 
    tableName  = 'monitor_rule_run_log';
    tableFields  = ['id','setting_id','last_run_log','next_run_log','error_count','create_time','update_time'];
    modelFields  = ['id','settingId','lastRunLog','nextRunLog','errorCount','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MonitorRuleRunLogCU {
        return new MonitorRuleRunLogCUImpl();
    }   

    static get ID(): FieldUtil<MonitorRuleRunLogCU>{ 
        return new FieldUtil('id','id','主键', new MonitorRuleRunLogCUImpl());
    }
    static get SETTING_ID(): FieldUtil<MonitorRuleRunLogCU>{ 
        return new FieldUtil('setting_id','settingId','监控设置ID', new MonitorRuleRunLogCUImpl());
    }
    static get LAST_RUN_LOG(): FieldUtil<MonitorRuleRunLogCU>{ 
        return new FieldUtil('last_run_log','lastRunLog','最后执行时间', new MonitorRuleRunLogCUImpl());
    }
    static get NEXT_RUN_LOG(): FieldUtil<MonitorRuleRunLogCU>{ 
        return new FieldUtil('next_run_log','nextRunLog','下次执行时间', new MonitorRuleRunLogCUImpl());
    }
    static get ERROR_COUNT(): FieldUtil<MonitorRuleRunLogCU>{ 
        return new FieldUtil('error_count','errorCount','持续异常次数', new MonitorRuleRunLogCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<MonitorRuleRunLogCU>{ 
        return new FieldUtil('create_time','createTime','create_time', new MonitorRuleRunLogCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<MonitorRuleRunLogCU>{ 
        return new FieldUtil('update_time','updateTime','update_time', new MonitorRuleRunLogCUImpl());
    }

    get ID(): FieldUtil<MonitorRuleRunLogCU>{ 
        return MonitorRuleRunLogMU.ID;
    }
    get SETTING_ID(): FieldUtil<MonitorRuleRunLogCU>{ 
        return MonitorRuleRunLogMU.SETTING_ID;
    }
    get LAST_RUN_LOG(): FieldUtil<MonitorRuleRunLogCU>{ 
        return MonitorRuleRunLogMU.LAST_RUN_LOG;
    }
    get NEXT_RUN_LOG(): FieldUtil<MonitorRuleRunLogCU>{ 
        return MonitorRuleRunLogMU.NEXT_RUN_LOG;
    }
    get ERROR_COUNT(): FieldUtil<MonitorRuleRunLogCU>{ 
        return MonitorRuleRunLogMU.ERROR_COUNT;
    }
    get CREATE_TIME(): FieldUtil<MonitorRuleRunLogCU>{ 
        return MonitorRuleRunLogMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<MonitorRuleRunLogCU>{ 
        return MonitorRuleRunLogMU.UPDATE_TIME;
    }
}
export {MonitorRuleRunLogMU, MonitorRuleRunLogCU}
