import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { MonitorRuleTemplate } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-09-15 13:46
 */
interface MonitorRuleTemplateCU extends ConditionUtil<MonitorRuleTemplateCU>{
    ID:FieldUtil<MonitorRuleTemplateCU>;
    TEMPLATE_NAME:FieldUtil<MonitorRuleTemplateCU>;
    REMARK:FieldUtil<MonitorRuleTemplateCU>;
    INDICATORS_CODE:FieldUtil<MonitorRuleTemplateCU>;
    PERIOD:FieldUtil<MonitorRuleTemplateCU>;
    STATISTICS:FieldUtil<MonitorRuleTemplateCU>;
    RELATION:FieldUtil<MonitorRuleTemplateCU>;
    THRESHOLD:FieldUtil<MonitorRuleTemplateCU>;
    DELETED:FieldUtil<MonitorRuleTemplateCU>;
    CREATE_TIME:FieldUtil<MonitorRuleTemplateCU>;
    UPDATE_TIME:FieldUtil<MonitorRuleTemplateCU>;
}

class MonitorRuleTemplateCUImpl extends ConditionUtilImpl<MonitorRuleTemplateCUImpl> implements MonitorRuleTemplateCU{ 
    newInstance(): MonitorRuleTemplateCUImpl {
        return new MonitorRuleTemplateCUImpl();
    } 
    get ID(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get TEMPLATE_NAME(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('template_name','templateName','模板名称', this);
    }
    get REMARK(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('remark','remark','描述', this);
    }
    get INDICATORS_CODE(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('indicators_code','indicatorsCode','指标编码', this);
    }
    get PERIOD(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('period','period','周期', this);
    }
    get STATISTICS(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('statistics','statistics','统计项目', this);
    }
    get RELATION(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('relation','relation','大小关系', this);
    }
    get THRESHOLD(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('threshold','threshold','阈值', this);
    }
    get DELETED(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('deleted','deleted','deleted', this);
    }
    get CREATE_TIME(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('create_time','createTime','create_time', this);
    }
    get UPDATE_TIME(): FieldUtil<MonitorRuleTemplateCU>{  
        return new FieldUtil('update_time','updateTime','update_time', this);
    }
}

@Singleton 
class MonitorRuleTemplateMU extends TableUtilImpl<MonitorRuleTemplateCU,MonitorRuleTemplate>{ 
    tableName  = 'monitor_rule_template';
    tableFields  = ['id','template_name','remark','indicators_code','period','statistics','relation','threshold','deleted','create_time','update_time'];
    modelFields  = ['id','templateName','remark','indicatorsCode','period','statistics','relation','threshold','deleted','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MonitorRuleTemplateCU {
        return new MonitorRuleTemplateCUImpl();
    }   

    static get ID(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('id','id','主键', new MonitorRuleTemplateCUImpl());
    }
    static get TEMPLATE_NAME(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('template_name','templateName','模板名称', new MonitorRuleTemplateCUImpl());
    }
    static get REMARK(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('remark','remark','描述', new MonitorRuleTemplateCUImpl());
    }
    static get INDICATORS_CODE(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('indicators_code','indicatorsCode','指标编码', new MonitorRuleTemplateCUImpl());
    }
    static get PERIOD(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('period','period','周期', new MonitorRuleTemplateCUImpl());
    }
    static get STATISTICS(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('statistics','statistics','统计项目', new MonitorRuleTemplateCUImpl());
    }
    static get RELATION(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('relation','relation','大小关系', new MonitorRuleTemplateCUImpl());
    }
    static get THRESHOLD(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('threshold','threshold','阈值', new MonitorRuleTemplateCUImpl());
    }
    static get DELETED(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('deleted','deleted','deleted', new MonitorRuleTemplateCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('create_time','createTime','create_time', new MonitorRuleTemplateCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<MonitorRuleTemplateCU>{ 
        return new FieldUtil('update_time','updateTime','update_time', new MonitorRuleTemplateCUImpl());
    }

    get ID(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.ID;
    }
    get TEMPLATE_NAME(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.TEMPLATE_NAME;
    }
    get REMARK(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.REMARK;
    }
    get INDICATORS_CODE(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.INDICATORS_CODE;
    }
    get PERIOD(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.PERIOD;
    }
    get STATISTICS(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.STATISTICS;
    }
    get RELATION(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.RELATION;
    }
    get THRESHOLD(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.THRESHOLD;
    }
    get DELETED(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.DELETED;
    }
    get CREATE_TIME(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<MonitorRuleTemplateCU>{ 
        return MonitorRuleTemplateMU.UPDATE_TIME;
    }
}
export {MonitorRuleTemplateMU, MonitorRuleTemplateCU}
