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 BMViewModelField{
    /**
    * 模型项目ID
    * @type { string }
    */
    bmProjectId?: string;
    /**
    * 视图模型ID
    * @type { string }
    */
    bmViewModelId?: string;
    /**
    * 列名称
    * @type { string }
    */
    columnName?: string;
    /**
    * 创建时间
    * @type { Date }
    */
    createTime?: Date;
    /**
    * 创建人ID
    * @type { string }
    */
    createUserId?: string;
    /**
    * 数据类型
    * @type { string }
    */
    dataType?: string;
    /**
    * 描述
    * @type { string }
    */
    description?: string;
    /**
    * 主键
    * @type { string }
    */
    id?: string;
    /**
    * JAVA数据类型
    * @type { string }
    */
    javaDataType?: string;
    /**
    * 字段名称
    * @type { string }
    */
    name?: string;
    /**
    * 是否主键列
    * @type { boolean }
    */
    primaryKey?: boolean;
    /**
    * 字段标题
    * @type { string }
    */
    title?: string;
    /**
    * 更新时间
    * @type { Date }
    */
    updateTime?: Date;
    /**
    * 修改人ID
    * @type { string }
    */
    updateUserId?: string;
    /**
    * 版本ID
    * @type { string }
    */
    versionId?: string;
}
interface BMViewModelFieldMCU extends ModelConditionUtil<BMViewModelFieldMCU>{
    BM_PROJECT_ID:FieldUtil<BMViewModelFieldMCU>;
    BM_VIEW_MODEL_ID:FieldUtil<BMViewModelFieldMCU>;
    COLUMN_NAME:FieldUtil<BMViewModelFieldMCU>;
    CREATE_TIME:FieldUtil<BMViewModelFieldMCU>;
    CREATE_USER_ID:FieldUtil<BMViewModelFieldMCU>;
    DATA_TYPE:FieldUtil<BMViewModelFieldMCU>;
    DESCRIPTION:FieldUtil<BMViewModelFieldMCU>;
    ID:FieldUtil<BMViewModelFieldMCU>;
    JAVA_DATA_TYPE:FieldUtil<BMViewModelFieldMCU>;
    NAME:FieldUtil<BMViewModelFieldMCU>;
    PRIMARY_KEY:FieldUtil<BMViewModelFieldMCU>;
    TITLE:FieldUtil<BMViewModelFieldMCU>;
    UPDATE_TIME:FieldUtil<BMViewModelFieldMCU>;
    UPDATE_USER_ID:FieldUtil<BMViewModelFieldMCU>;
    VERSION_ID:FieldUtil<BMViewModelFieldMCU>;
}

class BMViewModelFieldMCUImpl extends ModelConditionUtilImpl<BMViewModelFieldMCUImpl> implements BMViewModelFieldMCU{ 
    newInstance(): BMViewModelFieldMCUImpl {
        return new BMViewModelFieldMCUImpl();
    } 
    get BM_PROJECT_ID(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('BM_PROJECT_ID','bmProjectId','模型项目ID', this);
    }
    get BM_VIEW_MODEL_ID(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('BM_VIEW_MODEL_ID','bmViewModelId','视图模型ID', this);
    }
    get COLUMN_NAME(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('COLUMN_NAME','columnName','列名称', this);
    }
    get CREATE_TIME(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get CREATE_USER_ID(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('CREATE_USER_ID','createUserId','创建人ID', this);
    }
    get DATA_TYPE(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('DATA_TYPE','dataType','数据类型', this);
    }
    get DESCRIPTION(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('DESCRIPTION','description','描述', this);
    }
    get ID(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('ID','id','主键', this);
    }
    get JAVA_DATA_TYPE(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('JAVA_DATA_TYPE','javaDataType','JAVA数据类型', this);
    }
    get NAME(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('NAME','name','字段名称', this);
    }
    get PRIMARY_KEY(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('PRIMARY_KEY','primaryKey','是否主键列', this);
    }
    get TITLE(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('TITLE','title','字段标题', this);
    }
    get UPDATE_TIME(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
    get UPDATE_USER_ID(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('UPDATE_USER_ID','updateUserId','修改人ID', this);
    }
    get VERSION_ID(): FieldUtil<BMViewModelFieldMCU>{  
        return new FieldUtil('VERSION_ID','versionId','版本ID', this);
    }
}

@Singleton 
class BMViewModelFieldMU extends TableUtilImpl<BMViewModelFieldMCU,BMViewModelField>{ 
    tableName  = 'bm_view_model_field';
    tableFields  = ['bm_project_id','bm_view_model_id','column_name','create_time','create_user_id','data_type','description','id','java_data_type','name','primary_key','title','update_time','update_user_id','version_id'];
    modelFields  = ['bmProjectId','bmViewModelId','columnName','createTime','createUserId','dataType','description','id','javaDataType','name','primaryKey','title','updateTime','updateUserId','versionId'];
    modelIdFields  = [''];
    tableIdFields  = [''];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    constructor() {
        super(Container.get(Knex));
    }
    createModelConditionUtil(): BMViewModelFieldMCU {
        return new BMViewModelFieldMCUImpl();
    }   

    static get BM_PROJECT_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('BM_PROJECT_ID','bmProjectId','模型项目ID', new BMViewModelFieldMCUImpl());
    }
    static get BM_VIEW_MODEL_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('BM_VIEW_MODEL_ID','bmViewModelId','视图模型ID', new BMViewModelFieldMCUImpl());
    }
    static get COLUMN_NAME(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('COLUMN_NAME','columnName','列名称', new BMViewModelFieldMCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new BMViewModelFieldMCUImpl());
    }
    static get CREATE_USER_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('CREATE_USER_ID','createUserId','创建人ID', new BMViewModelFieldMCUImpl());
    }
    static get DATA_TYPE(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('DATA_TYPE','dataType','数据类型', new BMViewModelFieldMCUImpl());
    }
    static get DESCRIPTION(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('DESCRIPTION','description','描述', new BMViewModelFieldMCUImpl());
    }
    static get ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('ID','id','主键', new BMViewModelFieldMCUImpl());
    }
    static get JAVA_DATA_TYPE(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('JAVA_DATA_TYPE','javaDataType','JAVA数据类型', new BMViewModelFieldMCUImpl());
    }
    static get NAME(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('NAME','name','字段名称', new BMViewModelFieldMCUImpl());
    }
    static get PRIMARY_KEY(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('PRIMARY_KEY','primaryKey','是否主键列', new BMViewModelFieldMCUImpl());
    }
    static get TITLE(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('TITLE','title','字段标题', new BMViewModelFieldMCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new BMViewModelFieldMCUImpl());
    }
    static get UPDATE_USER_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('UPDATE_USER_ID','updateUserId','修改人ID', new BMViewModelFieldMCUImpl());
    }
    static get VERSION_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return new FieldUtil('VERSION_ID','versionId','版本ID', new BMViewModelFieldMCUImpl());
    }

    get BM_PROJECT_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.BM_PROJECT_ID;
    }
    get BM_VIEW_MODEL_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.BM_VIEW_MODEL_ID;
    }
    get COLUMN_NAME(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.COLUMN_NAME;
    }
    get CREATE_TIME(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.CREATE_TIME;
    }
    get CREATE_USER_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.CREATE_USER_ID;
    }
    get DATA_TYPE(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.DATA_TYPE;
    }
    get DESCRIPTION(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.DESCRIPTION;
    }
    get ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.ID;
    }
    get JAVA_DATA_TYPE(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.JAVA_DATA_TYPE;
    }
    get NAME(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.NAME;
    }
    get PRIMARY_KEY(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.PRIMARY_KEY;
    }
    get TITLE(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.TITLE;
    }
    get UPDATE_TIME(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.UPDATE_TIME;
    }
    get UPDATE_USER_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.UPDATE_USER_ID;
    }
    get VERSION_ID(): FieldUtil<BMViewModelFieldMCU>{ 
        return BMViewModelFieldMU.VERSION_ID;
    }
}
export {BMViewModelFieldMCU, BMViewModelFieldMCUImpl, BMViewModelField, BMViewModelFieldMU}
