import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { MsRunningTarget } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-09-24 13:17
 */
interface MsRunningTargetCU extends ConditionUtil<MsRunningTargetCU>{
    ID:FieldUtil<MsRunningTargetCU>;
    PROJECT_ID:FieldUtil<MsRunningTargetCU>;
    PID:FieldUtil<MsRunningTargetCU>;
    PROJECT_VERSION:FieldUtil<MsRunningTargetCU>;
    PROJECT_VERSION_ID:FieldUtil<MsRunningTargetCU>;
    MS_LOCATION:FieldUtil<MsRunningTargetCU>;
    GATEWAY_URL:FieldUtil<MsRunningTargetCU>;
    CONFIG_REQUIRES:FieldUtil<MsRunningTargetCU>;
    HOST:FieldUtil<MsRunningTargetCU>;
    PORT:FieldUtil<MsRunningTargetCU>;
    WEIGHT:FieldUtil<MsRunningTargetCU>;
    ENV:FieldUtil<MsRunningTargetCU>;
    ENV_CODE:FieldUtil<MsRunningTargetCU>;
    AREA_ID:FieldUtil<MsRunningTargetCU>;
    HEALTH:FieldUtil<MsRunningTargetCU>;
    LAST_ACTIVE_TIME:FieldUtil<MsRunningTargetCU>;
    LAST_POLLING_TIME:FieldUtil<MsRunningTargetCU>;
    DEPLOY_ID:FieldUtil<MsRunningTargetCU>;
    POD_ID:FieldUtil<MsRunningTargetCU>;
    K8S_ID:FieldUtil<MsRunningTargetCU>;
    CREATE_TIME:FieldUtil<MsRunningTargetCU>;
    UPDATE_TIME:FieldUtil<MsRunningTargetCU>;
    STATE:FieldUtil<MsRunningTargetCU>;
}

class MsRunningTargetCUImpl extends ConditionUtilImpl<MsRunningTargetCUImpl> implements MsRunningTargetCU{ 
    newInstance(): MsRunningTargetCUImpl {
        return new MsRunningTargetCUImpl();
    } 
    get ID(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('id','id','id', this);
    }
    get PROJECT_ID(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('project_id','projectId','項目ID', this);
    }
    get PID(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('pid','pid','项目pid', this);
    }
    get PROJECT_VERSION(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('project_version','projectVersion','项目版本', this);
    }
    get PROJECT_VERSION_ID(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('project_version_id','projectVersionId','项目版本ID', this);
    }
    get MS_LOCATION(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('ms_location','msLocation','服务提供者所处位置（InsideNet或K8sCluster）', this);
    }
    get GATEWAY_URL(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('gateway_url','gatewayUrl','网关地址', this);
    }
    get CONFIG_REQUIRES(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('config_requires','configRequires','关联配置', this);
    }
    get HOST(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('host','host','主机ip', this);
    }
    get PORT(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('port','port','端口', this);
    }
    get WEIGHT(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('weight','weight','权重', this);
    }
    get ENV(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('env','env','环境类型: dev/test/prod', this);
    }
    get ENV_CODE(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('env_code','envCode','环境代码', this);
    }
    get AREA_ID(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('area_id','areaId','区域', this);
    }
    get HEALTH(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('health','health','是否健康: 0：未知， 1：健康，-1：不健康', this);
    }
    get LAST_ACTIVE_TIME(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('last_active_time','lastActiveTime','主机最后活动时间戳', this);
    }
    get LAST_POLLING_TIME(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('last_polling_time','lastPollingTime','主机最后轮询时间戳', this);
    }
    get DEPLOY_ID(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('deploy_id','deployId','部署id', this);
    }
    get POD_ID(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('pod_id','podId','容器id', this);
    }
    get K8S_ID(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('k8s_id','k8sId','K8S ID', this);
    }
    get CREATE_TIME(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('create_time','createTime','create_time', this);
    }
    get UPDATE_TIME(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('update_time','updateTime','update_time', this);
    }
    get STATE(): FieldUtil<MsRunningTargetCU>{  
        return new FieldUtil('state','state','state', this);
    }
}

@Singleton 
class MsRunningTargetMU extends TableUtilImpl<MsRunningTargetCU,MsRunningTarget>{ 
    tableName  = 'ms_running_target';
    tableFields  = ['id','project_id','pid','project_version','project_version_id','ms_location','gateway_url','config_requires','host','port','weight','env','env_code','area_id','health','last_active_time','last_polling_time','deploy_id','pod_id','k8s_id','create_time','update_time','state'];
    modelFields  = ['id','projectId','pid','projectVersion','projectVersionId','msLocation','gatewayUrl','configRequires','host','port','weight','env','envCode','areaId','health','lastActiveTime','lastPollingTime','deployId','podId','k8sId','createTime','updateTime','state'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): MsRunningTargetCU {
        return new MsRunningTargetCUImpl();
    }   

    static get ID(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('id','id','id', new MsRunningTargetCUImpl());
    }
    static get PROJECT_ID(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('project_id','projectId','項目ID', new MsRunningTargetCUImpl());
    }
    static get PID(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('pid','pid','项目pid', new MsRunningTargetCUImpl());
    }
    static get PROJECT_VERSION(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('project_version','projectVersion','项目版本', new MsRunningTargetCUImpl());
    }
    static get PROJECT_VERSION_ID(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('project_version_id','projectVersionId','项目版本ID', new MsRunningTargetCUImpl());
    }
    static get MS_LOCATION(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('ms_location','msLocation','服务提供者所处位置（InsideNet或K8sCluster）', new MsRunningTargetCUImpl());
    }
    static get GATEWAY_URL(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('gateway_url','gatewayUrl','网关地址', new MsRunningTargetCUImpl());
    }
    static get CONFIG_REQUIRES(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('config_requires','configRequires','关联配置', new MsRunningTargetCUImpl());
    }
    static get HOST(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('host','host','主机ip', new MsRunningTargetCUImpl());
    }
    static get PORT(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('port','port','端口', new MsRunningTargetCUImpl());
    }
    static get WEIGHT(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('weight','weight','权重', new MsRunningTargetCUImpl());
    }
    static get ENV(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('env','env','环境类型: dev/test/prod', new MsRunningTargetCUImpl());
    }
    static get ENV_CODE(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('env_code','envCode','环境代码', new MsRunningTargetCUImpl());
    }
    static get AREA_ID(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('area_id','areaId','区域', new MsRunningTargetCUImpl());
    }
    static get HEALTH(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('health','health','是否健康: 0：未知， 1：健康，-1：不健康', new MsRunningTargetCUImpl());
    }
    static get LAST_ACTIVE_TIME(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('last_active_time','lastActiveTime','主机最后活动时间戳', new MsRunningTargetCUImpl());
    }
    static get LAST_POLLING_TIME(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('last_polling_time','lastPollingTime','主机最后轮询时间戳', new MsRunningTargetCUImpl());
    }
    static get DEPLOY_ID(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('deploy_id','deployId','部署id', new MsRunningTargetCUImpl());
    }
    static get POD_ID(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('pod_id','podId','容器id', new MsRunningTargetCUImpl());
    }
    static get K8S_ID(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('k8s_id','k8sId','K8S ID', new MsRunningTargetCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('create_time','createTime','create_time', new MsRunningTargetCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('update_time','updateTime','update_time', new MsRunningTargetCUImpl());
    }
    static get STATE(): FieldUtil<MsRunningTargetCU>{ 
        return new FieldUtil('state','state','state', new MsRunningTargetCUImpl());
    }

    get ID(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.ID;
    }
    get PROJECT_ID(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.PROJECT_ID;
    }
    get PID(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.PID;
    }
    get PROJECT_VERSION(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.PROJECT_VERSION;
    }
    get PROJECT_VERSION_ID(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.PROJECT_VERSION_ID;
    }
    get MS_LOCATION(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.MS_LOCATION;
    }
    get GATEWAY_URL(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.GATEWAY_URL;
    }
    get CONFIG_REQUIRES(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.CONFIG_REQUIRES;
    }
    get HOST(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.HOST;
    }
    get PORT(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.PORT;
    }
    get WEIGHT(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.WEIGHT;
    }
    get ENV(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.ENV;
    }
    get ENV_CODE(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.ENV_CODE;
    }
    get AREA_ID(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.AREA_ID;
    }
    get HEALTH(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.HEALTH;
    }
    get LAST_ACTIVE_TIME(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.LAST_ACTIVE_TIME;
    }
    get LAST_POLLING_TIME(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.LAST_POLLING_TIME;
    }
    get DEPLOY_ID(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.DEPLOY_ID;
    }
    get POD_ID(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.POD_ID;
    }
    get K8S_ID(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.K8S_ID;
    }
    get CREATE_TIME(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.UPDATE_TIME;
    }
    get STATE(): FieldUtil<MsRunningTargetCU>{ 
        return MsRunningTargetMU.STATE;
    }
}
export {MsRunningTargetMU, MsRunningTargetCU}
