import {ModelConditionUtil, ModelConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, BasicFieldUtil, JoinTable, SubTable } from 'model-util'
import {Container, Singleton} from 'typescript-ioc' 
import * as Knex from 'knex' 
/**
 * @author Keytop midend auto generate
 * @version 1.0
 * @date 2020-06-02 13:51
 */
interface BMSServiceReleaseTag{
    /**
    * 应用ID
    * @type { string }
    */
    appId?: string;
    /**
    * 创建时间
    * @type { Date }
    */
    createTime?: Date;
    /**
    * 环境ID
    * @type { string }
    */
    envId?: string;
    /**
    * 主键
    * @type { string }
    */
    id?: string;
    /**
    * 项目PID
    * @type { string }
    */
    pid?: string;
    /**
    * 项目ID
    * @type { string }
    */
    projectId?: string;
    /**
    * 发布人
    * @type { string }
    */
    releaseUserId?: string;
    /**
    * 服务中心ID
    * @type { string }
    */
    serviceCenterId?: string;
    /**
    * 更新时间
    * @type { Date }
    */
    updateTime?: Date;
    /**
    * 版本ID
    * @type { string }
    */
    versionId?: string;
    /**
    * 版本号
    * @type { string }
    */
    versionNo?: string;
}
interface BMSServiceReleaseTagMCU extends ModelConditionUtil<BMSServiceReleaseTagMCU>{
    APP_ID:FieldUtil<BMSServiceReleaseTagMCU>;
    CREATE_TIME:FieldUtil<BMSServiceReleaseTagMCU>;
    ENV_ID:FieldUtil<BMSServiceReleaseTagMCU>;
    ID:FieldUtil<BMSServiceReleaseTagMCU>;
    PID:FieldUtil<BMSServiceReleaseTagMCU>;
    PROJECT_ID:FieldUtil<BMSServiceReleaseTagMCU>;
    RELEASE_USER_ID:FieldUtil<BMSServiceReleaseTagMCU>;
    SERVICE_CENTER_ID:FieldUtil<BMSServiceReleaseTagMCU>;
    UPDATE_TIME:FieldUtil<BMSServiceReleaseTagMCU>;
    VERSION_ID:FieldUtil<BMSServiceReleaseTagMCU>;
    VERSION_NO:FieldUtil<BMSServiceReleaseTagMCU>;
}

class BMSServiceReleaseTagMCUImpl extends ModelConditionUtilImpl<BMSServiceReleaseTagMCUImpl> implements BMSServiceReleaseTagMCU{ 
    newInstance(): BMSServiceReleaseTagMCUImpl {
        return new BMSServiceReleaseTagMCUImpl();
    } 
    get APP_ID(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('APP_ID','appId','应用ID', this);
    }
    get CREATE_TIME(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get ENV_ID(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('ENV_ID','envId','环境ID', this);
    }
    get ID(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('ID','id','主键', this);
    }
    get PID(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('PID','pid','项目PID', this);
    }
    get PROJECT_ID(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('PROJECT_ID','projectId','项目ID', this);
    }
    get RELEASE_USER_ID(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('RELEASE_USER_ID','releaseUserId','发布人', this);
    }
    get SERVICE_CENTER_ID(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('SERVICE_CENTER_ID','serviceCenterId','服务中心ID', this);
    }
    get UPDATE_TIME(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
    get VERSION_ID(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('VERSION_ID','versionId','版本ID', this);
    }
    get VERSION_NO(): FieldUtil<BMSServiceReleaseTagMCU>{  
        return new FieldUtil('VERSION_NO','versionNo','版本号', this);
    }
}

@Singleton 
class BMSServiceReleaseTagMU extends TableUtilImpl<BMSServiceReleaseTagMCU,BMSServiceReleaseTag>{ 
    tableName  = 'bms_service_release_tag';
    tableFields  = ['app_id','create_time','env_id','id','pid','project_id','release_user_id','service_center_id','update_time','version_id','version_no'];
    modelFields  = ['appId','createTime','envId','id','pid','projectId','releaseUserId','serviceCenterId','updateTime','versionId','versionNo'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    constructor() {
        super(Container.get(Knex));
    }
    createModelConditionUtil(): BMSServiceReleaseTagMCU {
        return new BMSServiceReleaseTagMCUImpl();
    }   

    static get APP_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('APP_ID','appId','应用ID', new BMSServiceReleaseTagMCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new BMSServiceReleaseTagMCUImpl());
    }
    static get ENV_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('ENV_ID','envId','环境ID', new BMSServiceReleaseTagMCUImpl());
    }
    static get ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('ID','id','主键', new BMSServiceReleaseTagMCUImpl());
    }
    static get PID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('PID','pid','项目PID', new BMSServiceReleaseTagMCUImpl());
    }
    static get PROJECT_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('PROJECT_ID','projectId','项目ID', new BMSServiceReleaseTagMCUImpl());
    }
    static get RELEASE_USER_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('RELEASE_USER_ID','releaseUserId','发布人', new BMSServiceReleaseTagMCUImpl());
    }
    static get SERVICE_CENTER_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('SERVICE_CENTER_ID','serviceCenterId','服务中心ID', new BMSServiceReleaseTagMCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new BMSServiceReleaseTagMCUImpl());
    }
    static get VERSION_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('VERSION_ID','versionId','版本ID', new BMSServiceReleaseTagMCUImpl());
    }
    static get VERSION_NO(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return new FieldUtil('VERSION_NO','versionNo','版本号', new BMSServiceReleaseTagMCUImpl());
    }

    get APP_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.APP_ID;
    }
    get CREATE_TIME(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.CREATE_TIME;
    }
    get ENV_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.ENV_ID;
    }
    get ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.ID;
    }
    get PID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.PID;
    }
    get PROJECT_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.PROJECT_ID;
    }
    get RELEASE_USER_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.RELEASE_USER_ID;
    }
    get SERVICE_CENTER_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.SERVICE_CENTER_ID;
    }
    get UPDATE_TIME(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.UPDATE_TIME;
    }
    get VERSION_ID(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.VERSION_ID;
    }
    get VERSION_NO(): FieldUtil<BMSServiceReleaseTagMCU>{ 
        return BMSServiceReleaseTagMU.VERSION_NO;
    }
}
export {BMSServiceReleaseTagMCU, BMSServiceReleaseTagMCUImpl, BMSServiceReleaseTag, BMSServiceReleaseTagMU}
