import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { ModelField } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-06-30 18:04
 */
interface ModelFieldCU extends ConditionUtil<ModelFieldCU>{
    ID:FieldUtil<ModelFieldCU>;
    BM_PROJECT_ID:FieldUtil<ModelFieldCU>;
    BM_VIEW_MODEL_ID:FieldUtil<ModelFieldCU>;
    VERSION_ID:FieldUtil<ModelFieldCU>;
    NAME:FieldUtil<ModelFieldCU>;
    COLUMN_NAME:FieldUtil<ModelFieldCU>;
    PRIMARY_KEY:FieldUtil<ModelFieldCU>;
    PRIMARY_KEY_GEN_TYPE:FieldUtil<ModelFieldCU>;
    TITLE:FieldUtil<ModelFieldCU>;
    DATA_TYPE:FieldUtil<ModelFieldCU>;
    JAVA_DATA_TYPE:FieldUtil<ModelFieldCU>;
    DESCRIPTION:FieldUtil<ModelFieldCU>;
    UPDATE_USER_ID:FieldUtil<ModelFieldCU>;
    CREATE_USER_ID:FieldUtil<ModelFieldCU>;
    CREATE_TIME:FieldUtil<ModelFieldCU>;
    UPDATE_TIME:FieldUtil<ModelFieldCU>;
    FROM_ID:FieldUtil<ModelFieldCU>;
}

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

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

    createConditionUtil(): ModelFieldCU {
        return new ModelFieldCUImpl();
    }   

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

    get ID(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.ID;
    }
    get BM_PROJECT_ID(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.BM_PROJECT_ID;
    }
    get BM_VIEW_MODEL_ID(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.BM_VIEW_MODEL_ID;
    }
    get VERSION_ID(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.VERSION_ID;
    }
    get NAME(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.NAME;
    }
    get COLUMN_NAME(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.COLUMN_NAME;
    }
    get PRIMARY_KEY(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.PRIMARY_KEY;
    }
    get PRIMARY_KEY_GEN_TYPE(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.PRIMARY_KEY_GEN_TYPE;
    }
    get TITLE(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.TITLE;
    }
    get DATA_TYPE(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.DATA_TYPE;
    }
    get JAVA_DATA_TYPE(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.JAVA_DATA_TYPE;
    }
    get DESCRIPTION(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.DESCRIPTION;
    }
    get UPDATE_USER_ID(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.UPDATE_USER_ID;
    }
    get CREATE_USER_ID(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.CREATE_USER_ID;
    }
    get CREATE_TIME(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.UPDATE_TIME;
    }
    get FROM_ID(): FieldUtil<ModelFieldCU>{ 
        return ModelFieldMU.FROM_ID;
    }
}
export {ModelFieldMU, ModelFieldCU}
