import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { CnRunningTarget } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-06-11 14:39
 */
interface CnRunningTargetCU extends ConditionUtil<CnRunningTargetCU>{
    ID:FieldUtil<CnRunningTargetCU>;
    DEPLOY_ID:FieldUtil<CnRunningTargetCU>;
    K8S_ID:FieldUtil<CnRunningTargetCU>;
    GATEWAY_ID:FieldUtil<CnRunningTargetCU>;
    GATEWAY_ADMIN_URL:FieldUtil<CnRunningTargetCU>;
    K8S_POD_ID:FieldUtil<CnRunningTargetCU>;
    POD_ID:FieldUtil<CnRunningTargetCU>;
    ENV_CODE:FieldUtil<CnRunningTargetCU>;
    IP:FieldUtil<CnRunningTargetCU>;
    PORT:FieldUtil<CnRunningTargetCU>;
    CLOUD_PROVIDER:FieldUtil<CnRunningTargetCU>;
    LAST_ACTIVE_TIME:FieldUtil<CnRunningTargetCU>;
    LAST_POLLING_TIME:FieldUtil<CnRunningTargetCU>;
    CREATE_TIME:FieldUtil<CnRunningTargetCU>;
    UPDATE_TIME:FieldUtil<CnRunningTargetCU>;
}

class CnRunningTargetCUImpl extends ConditionUtilImpl<CnRunningTargetCUImpl> implements CnRunningTargetCU{ 
    newInstance(): CnRunningTargetCUImpl {
        return new CnRunningTargetCUImpl();
    } 
    get ID(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('id','id','主键', this);
    }
    get DEPLOY_ID(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('deploy_id','deployId','部署ID', this);
    }
    get K8S_ID(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('k8s_id','k8sId','K8S环境ID', this);
    }
    get GATEWAY_ID(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('gateway_id','gatewayId','网关ID', this);
    }
    get GATEWAY_ADMIN_URL(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('gateway_admin_url','gatewayAdminUrl','网关API地址', this);
    }
    get K8S_POD_ID(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('k8s_pod_id','k8sPodId','k8s_pod_id', this);
    }
    get POD_ID(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('pod_id','podId','pod_id', this);
    }
    get ENV_CODE(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('env_code','envCode','环境代码', this);
    }
    get IP(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('ip','ip','IP', this);
    }
    get PORT(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('port','port','端口号', this);
    }
    get CLOUD_PROVIDER(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('cloud_provider','cloudProvider','云厂商', this);
    }
    get LAST_ACTIVE_TIME(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('last_active_time','lastActiveTime','最近活跃时间', this);
    }
    get LAST_POLLING_TIME(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('last_polling_time','lastPollingTime','最近轮询时间', this);
    }
    get CREATE_TIME(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('create_time','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<CnRunningTargetCU>{  
        return new FieldUtil('update_time','updateTime','更新时间', this);
    }
}

@Singleton 
class CnRunningTargetMU extends TableUtilImpl<CnRunningTargetCU,CnRunningTarget>{ 
    tableName  = 'cn_running_target';
    tableFields  = ['id','deploy_id','k8s_id','gateway_id','gateway_admin_url','k8s_pod_id','pod_id','env_code','ip','port','cloud_provider','last_active_time','last_polling_time','create_time','update_time'];
    modelFields  = ['id','deployId','k8sId','gatewayId','gatewayAdminUrl','k8sPodId','podId','envCode','ip','port','cloudProvider','lastActiveTime','lastPollingTime','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): CnRunningTargetCU {
        return new CnRunningTargetCUImpl();
    }   

    static get ID(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('id','id','主键', new CnRunningTargetCUImpl());
    }
    static get DEPLOY_ID(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('deploy_id','deployId','部署ID', new CnRunningTargetCUImpl());
    }
    static get K8S_ID(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('k8s_id','k8sId','K8S环境ID', new CnRunningTargetCUImpl());
    }
    static get GATEWAY_ID(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('gateway_id','gatewayId','网关ID', new CnRunningTargetCUImpl());
    }
    static get GATEWAY_ADMIN_URL(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('gateway_admin_url','gatewayAdminUrl','网关API地址', new CnRunningTargetCUImpl());
    }
    static get K8S_POD_ID(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('k8s_pod_id','k8sPodId','k8s_pod_id', new CnRunningTargetCUImpl());
    }
    static get POD_ID(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('pod_id','podId','pod_id', new CnRunningTargetCUImpl());
    }
    static get ENV_CODE(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('env_code','envCode','环境代码', new CnRunningTargetCUImpl());
    }
    static get IP(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('ip','ip','IP', new CnRunningTargetCUImpl());
    }
    static get PORT(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('port','port','端口号', new CnRunningTargetCUImpl());
    }
    static get CLOUD_PROVIDER(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('cloud_provider','cloudProvider','云厂商', new CnRunningTargetCUImpl());
    }
    static get LAST_ACTIVE_TIME(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('last_active_time','lastActiveTime','最近活跃时间', new CnRunningTargetCUImpl());
    }
    static get LAST_POLLING_TIME(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('last_polling_time','lastPollingTime','最近轮询时间', new CnRunningTargetCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('create_time','createTime','创建时间', new CnRunningTargetCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<CnRunningTargetCU>{ 
        return new FieldUtil('update_time','updateTime','更新时间', new CnRunningTargetCUImpl());
    }

    get ID(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.ID;
    }
    get DEPLOY_ID(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.DEPLOY_ID;
    }
    get K8S_ID(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.K8S_ID;
    }
    get GATEWAY_ID(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.GATEWAY_ID;
    }
    get GATEWAY_ADMIN_URL(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.GATEWAY_ADMIN_URL;
    }
    get K8S_POD_ID(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.K8S_POD_ID;
    }
    get POD_ID(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.POD_ID;
    }
    get ENV_CODE(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.ENV_CODE;
    }
    get IP(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.IP;
    }
    get PORT(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.PORT;
    }
    get CLOUD_PROVIDER(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.CLOUD_PROVIDER;
    }
    get LAST_ACTIVE_TIME(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.LAST_ACTIVE_TIME;
    }
    get LAST_POLLING_TIME(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.LAST_POLLING_TIME;
    }
    get CREATE_TIME(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<CnRunningTargetCU>{ 
        return CnRunningTargetMU.UPDATE_TIME;
    }
}
export {CnRunningTargetMU, CnRunningTargetCU}
