import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { MsMonitorMetrics } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-06-22 11:31
 */
interface MsMonitorMetricsCU extends ConditionUtil<MsMonitorMetricsCU>{
    ID:FieldUtil<MsMonitorMetricsCU>;
    CREATE_TIME:FieldUtil<MsMonitorMetricsCU>;
    UPDATE_TIME:FieldUtil<MsMonitorMetricsCU>;
    STATE:FieldUtil<MsMonitorMetricsCU>;
    CODE:FieldUtil<MsMonitorMetricsCU>;
    NAME:FieldUtil<MsMonitorMetricsCU>;
    UNIT_NAME:FieldUtil<MsMonitorMetricsCU>;
    PROMETHEUS_QUERY_PARAM:FieldUtil<MsMonitorMetricsCU>;
    REMARK:FieldUtil<MsMonitorMetricsCU>;
}

class MsMonitorMetricsCUImpl extends ConditionUtilImpl<MsMonitorMetricsCUImpl> implements MsMonitorMetricsCU{ 
    newInstance(): MsMonitorMetricsCUImpl {
        return new MsMonitorMetricsCUImpl();
    } 
    get ID(): FieldUtil<MsMonitorMetricsCU>{  
        return new FieldUtil('id','id','id', this);
    }
    get CREATE_TIME(): FieldUtil<MsMonitorMetricsCU>{  
        return new FieldUtil('create_time','createTime','create_time', this);
    }
    get UPDATE_TIME(): FieldUtil<MsMonitorMetricsCU>{  
        return new FieldUtil('update_time','updateTime','update_time', this);
    }
    get STATE(): FieldUtil<MsMonitorMetricsCU>{  
        return new FieldUtil('state','state','state', this);
    }
    get CODE(): FieldUtil<MsMonitorMetricsCU>{  
        return new FieldUtil('code','code','代码', this);
    }
    get NAME(): FieldUtil<MsMonitorMetricsCU>{  
        return new FieldUtil('name','name','名称', this);
    }
    get UNIT_NAME(): FieldUtil<MsMonitorMetricsCU>{  
        return new FieldUtil('unit_name','unitName','单位名称', this);
    }
    get PROMETHEUS_QUERY_PARAM(): FieldUtil<MsMonitorMetricsCU>{  
        return new FieldUtil('prometheus_query_param','prometheusQueryParam','prometheus查询查询参数定义（JSON)', this);
    }
    get REMARK(): FieldUtil<MsMonitorMetricsCU>{  
        return new FieldUtil('remark','remark','备注', this);
    }
}

@Singleton 
class MsMonitorMetricsMU extends TableUtilImpl<MsMonitorMetricsCU,MsMonitorMetrics>{ 
    tableName  = 'ms_monitor_metrics';
    tableFields  = ['id','create_time','update_time','state','code','name','unit_name','prometheus_query_param','remark'];
    modelFields  = ['id','createTime','updateTime','state','code','name','unitName','prometheusQueryParam','remark'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MsMonitorMetricsCU {
        return new MsMonitorMetricsCUImpl();
    }   

    static get ID(): FieldUtil<MsMonitorMetricsCU>{ 
        return new FieldUtil('id','id','id', new MsMonitorMetricsCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<MsMonitorMetricsCU>{ 
        return new FieldUtil('create_time','createTime','create_time', new MsMonitorMetricsCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<MsMonitorMetricsCU>{ 
        return new FieldUtil('update_time','updateTime','update_time', new MsMonitorMetricsCUImpl());
    }
    static get STATE(): FieldUtil<MsMonitorMetricsCU>{ 
        return new FieldUtil('state','state','state', new MsMonitorMetricsCUImpl());
    }
    static get CODE(): FieldUtil<MsMonitorMetricsCU>{ 
        return new FieldUtil('code','code','代码', new MsMonitorMetricsCUImpl());
    }
    static get NAME(): FieldUtil<MsMonitorMetricsCU>{ 
        return new FieldUtil('name','name','名称', new MsMonitorMetricsCUImpl());
    }
    static get UNIT_NAME(): FieldUtil<MsMonitorMetricsCU>{ 
        return new FieldUtil('unit_name','unitName','单位名称', new MsMonitorMetricsCUImpl());
    }
    static get PROMETHEUS_QUERY_PARAM(): FieldUtil<MsMonitorMetricsCU>{ 
        return new FieldUtil('prometheus_query_param','prometheusQueryParam','prometheus查询查询参数定义（JSON)', new MsMonitorMetricsCUImpl());
    }
    static get REMARK(): FieldUtil<MsMonitorMetricsCU>{ 
        return new FieldUtil('remark','remark','备注', new MsMonitorMetricsCUImpl());
    }

    get ID(): FieldUtil<MsMonitorMetricsCU>{ 
        return MsMonitorMetricsMU.ID;
    }
    get CREATE_TIME(): FieldUtil<MsMonitorMetricsCU>{ 
        return MsMonitorMetricsMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<MsMonitorMetricsCU>{ 
        return MsMonitorMetricsMU.UPDATE_TIME;
    }
    get STATE(): FieldUtil<MsMonitorMetricsCU>{ 
        return MsMonitorMetricsMU.STATE;
    }
    get CODE(): FieldUtil<MsMonitorMetricsCU>{ 
        return MsMonitorMetricsMU.CODE;
    }
    get NAME(): FieldUtil<MsMonitorMetricsCU>{ 
        return MsMonitorMetricsMU.NAME;
    }
    get UNIT_NAME(): FieldUtil<MsMonitorMetricsCU>{ 
        return MsMonitorMetricsMU.UNIT_NAME;
    }
    get PROMETHEUS_QUERY_PARAM(): FieldUtil<MsMonitorMetricsCU>{ 
        return MsMonitorMetricsMU.PROMETHEUS_QUERY_PARAM;
    }
    get REMARK(): FieldUtil<MsMonitorMetricsCU>{ 
        return MsMonitorMetricsMU.REMARK;
    }
}
export {MsMonitorMetricsMU, MsMonitorMetricsCU}
