import {ModelConditionUtil, ModelConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, BasicFieldUtil, JoinTable, SubTable, DataState } from 'model-util'
import {Container, Singleton} from 'typescript-ioc' 
/**
 * @author Keytop midend auto generate
 * @version 1.0
 * @date 2020-06-13 11:02
 */
interface BmModel{
    /**
    * 模型项目ID
    * @type { string }
    */
    bmProjectId?: string;
    /**
    * 构建方式 0:sql,1:手动创建,2:表名
    * @type { string }
    */
    buildMethod?: string;
    /**
    * 构建SQL
    * @type { string }
    */
    buildSql?: string;
    /**
    * 创建时间
    * @type { Date }
    */
    createTime?: Date;
    /**
    * 创建人ID
    * @type { string }
    */
    createUserId?: string;
    /**
    * 数据源ID
    * @type { string }
    */
    datasourceId?: string;
    /**
    * 描述
    * @type { string }
    */
    description?: string;
    /**
    * from_id
    * @type { string }
    */
    fromId?: string;
    /**
    * 主键
    * @type { string }
    */
    id?: string;
    /**
    * 模型名称
    * @type { string }
    */
    name?: string;
    /**
    * 是否已发布的
    * @type { boolean }
    */
    released?: boolean;
    /**
    * 表名
    * @type { string }
    */
    tableName?: string;
    /**
    * 更新时间
    * @type { Date }
    */
    updateTime?: Date;
    /**
    * 修改人ID
    * @type { string }
    */
    updateUserId?: string;
    /**
    * 版本ID
    * @type { string }
    */
    versionId?: string;
    /**
    * 版本ID
    * @type { string }
    */
    versionNo?: string;
}
interface BmModelMCU extends ModelConditionUtil<BmModelMCU>{
    BM_PROJECT_ID:FieldUtil<BmModelMCU>;
    BUILD_METHOD:FieldUtil<BmModelMCU>;
    BUILD_SQL:FieldUtil<BmModelMCU>;
    CREATE_TIME:FieldUtil<BmModelMCU>;
    CREATE_USER_ID:FieldUtil<BmModelMCU>;
    DATASOURCE_ID:FieldUtil<BmModelMCU>;
    DESCRIPTION:FieldUtil<BmModelMCU>;
    FROM_ID:FieldUtil<BmModelMCU>;
    ID:FieldUtil<BmModelMCU>;
    NAME:FieldUtil<BmModelMCU>;
    RELEASED:FieldUtil<BmModelMCU>;
    TABLE_NAME:FieldUtil<BmModelMCU>;
    UPDATE_TIME:FieldUtil<BmModelMCU>;
    UPDATE_USER_ID:FieldUtil<BmModelMCU>;
    VERSION_ID:FieldUtil<BmModelMCU>;
    VERSION_NO:FieldUtil<BmModelMCU>;
}

class BmModelMCUImpl extends ModelConditionUtilImpl<BmModelMCUImpl> implements BmModelMCU{ 
    newInstance(): BmModelMCUImpl {
        return new BmModelMCUImpl();
    } 
    get BM_PROJECT_ID(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('BM_PROJECT_ID','bmProjectId','模型项目ID', this);
    }
    get BUILD_METHOD(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('BUILD_METHOD','buildMethod','构建方式 0:sql,1:手动创建,2:表名', this);
    }
    get BUILD_SQL(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('BUILD_SQL','buildSql','构建SQL', this);
    }
    get CREATE_TIME(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get CREATE_USER_ID(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('CREATE_USER_ID','createUserId','创建人ID', this);
    }
    get DATASOURCE_ID(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('DATASOURCE_ID','datasourceId','数据源ID', this);
    }
    get DESCRIPTION(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('DESCRIPTION','description','描述', this);
    }
    get FROM_ID(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('FROM_ID','fromId','from_id', this);
    }
    get ID(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('ID','id','主键', this);
    }
    get NAME(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('NAME','name','模型名称', this);
    }
    get RELEASED(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('RELEASED','released','是否已发布的', this);
    }
    get TABLE_NAME(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('TABLE_NAME','tableName','表名', this);
    }
    get UPDATE_TIME(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
    get UPDATE_USER_ID(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('UPDATE_USER_ID','updateUserId','修改人ID', this);
    }
    get VERSION_ID(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('VERSION_ID','versionId','版本ID', this);
    }
    get VERSION_NO(): FieldUtil<BmModelMCU>{  
        return new FieldUtil('VERSION_NO','versionNo','版本ID', this);
    }
}

@Singleton 
class BmModelMU extends TableUtilImpl<BmModelMCU,BmModel>{ 
    tableName  = 'bm_view_model';
    tableFields  = ['bm_project_id','build_method','build_sql','create_time','create_user_id','datasource_id','description','from_id','id','name','released','table_name','update_time','update_user_id','version_id','version_no'];
    modelFields  = ['bmProjectId','buildMethod','buildSql','createTime','createUserId','datasourceId','description','fromId','id','name','released','tableName','updateTime','updateUserId','versionId','versionNo'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createModelConditionUtil(): BmModelMCU {
        return new BmModelMCUImpl();
    }   

    static get BM_PROJECT_ID(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('BM_PROJECT_ID','bmProjectId','模型项目ID', new BmModelMCUImpl());
    }
    static get BUILD_METHOD(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('BUILD_METHOD','buildMethod','构建方式 0:sql,1:手动创建,2:表名', new BmModelMCUImpl());
    }
    static get BUILD_SQL(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('BUILD_SQL','buildSql','构建SQL', new BmModelMCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new BmModelMCUImpl());
    }
    static get CREATE_USER_ID(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('CREATE_USER_ID','createUserId','创建人ID', new BmModelMCUImpl());
    }
    static get DATASOURCE_ID(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('DATASOURCE_ID','datasourceId','数据源ID', new BmModelMCUImpl());
    }
    static get DESCRIPTION(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('DESCRIPTION','description','描述', new BmModelMCUImpl());
    }
    static get FROM_ID(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('FROM_ID','fromId','from_id', new BmModelMCUImpl());
    }
    static get ID(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('ID','id','主键', new BmModelMCUImpl());
    }
    static get NAME(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('NAME','name','模型名称', new BmModelMCUImpl());
    }
    static get RELEASED(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('RELEASED','released','是否已发布的', new BmModelMCUImpl());
    }
    static get TABLE_NAME(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('TABLE_NAME','tableName','表名', new BmModelMCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new BmModelMCUImpl());
    }
    static get UPDATE_USER_ID(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('UPDATE_USER_ID','updateUserId','修改人ID', new BmModelMCUImpl());
    }
    static get VERSION_ID(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('VERSION_ID','versionId','版本ID', new BmModelMCUImpl());
    }
    static get VERSION_NO(): FieldUtil<BmModelMCU>{ 
        return new FieldUtil('VERSION_NO','versionNo','版本ID', new BmModelMCUImpl());
    }

    get BM_PROJECT_ID(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.BM_PROJECT_ID;
    }
    get BUILD_METHOD(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.BUILD_METHOD;
    }
    get BUILD_SQL(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.BUILD_SQL;
    }
    get CREATE_TIME(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.CREATE_TIME;
    }
    get CREATE_USER_ID(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.CREATE_USER_ID;
    }
    get DATASOURCE_ID(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.DATASOURCE_ID;
    }
    get DESCRIPTION(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.DESCRIPTION;
    }
    get FROM_ID(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.FROM_ID;
    }
    get ID(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.ID;
    }
    get NAME(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.NAME;
    }
    get RELEASED(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.RELEASED;
    }
    get TABLE_NAME(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.TABLE_NAME;
    }
    get UPDATE_TIME(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.UPDATE_TIME;
    }
    get UPDATE_USER_ID(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.UPDATE_USER_ID;
    }
    get VERSION_ID(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.VERSION_ID;
    }
    get VERSION_NO(): FieldUtil<BmModelMCU>{ 
        return BmModelMU.VERSION_NO;
    }
}
export {BmModel, BmModelMU}
