import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { User } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2020-10-16 11:27
 */
interface UserCU extends ConditionUtil<UserCU>{
    ID:FieldUtil<UserCU>;
    CODE:FieldUtil<UserCU>;
    NAME:FieldUtil<UserCU>;
    SEX:FieldUtil<UserCU>;
    NICKNAME:FieldUtil<UserCU>;
    AVATAR:FieldUtil<UserCU>;
    TELEPHONE:FieldUtil<UserCU>;
    IDENTITY_NO:FieldUtil<UserCU>;
    BIRTH_DAY:FieldUtil<UserCU>;
    PASSWORD:FieldUtil<UserCU>;
    EMAIL:FieldUtil<UserCU>;
    BIZ_STATUS:FieldUtil<UserCU>;
    CREATE_USER_ID:FieldUtil<UserCU>;
    UPDATE_USER_ID:FieldUtil<UserCU>;
    REMARK:FieldUtil<UserCU>;
    CREATE_TIME:FieldUtil<UserCU>;
    UPDATE_TIME:FieldUtil<UserCU>;
    STATE:FieldUtil<UserCU>;
    LANGUAGE_CODE:FieldUtil<UserCU>;
    TELEPHONE_AREA_CODE:FieldUtil<UserCU>;
}

class UserCUImpl extends ConditionUtilImpl<UserCUImpl> implements UserCU{ 
    newInstance(): UserCUImpl {
        return new UserCUImpl();
    } 
    get ID(): FieldUtil<UserCU>{  
        return new FieldUtil('ID','id','', this);
    }
    get CODE(): FieldUtil<UserCU>{  
        return new FieldUtil('CODE','code','代码', this);
    }
    get NAME(): FieldUtil<UserCU>{  
        return new FieldUtil('NAME','name','名称', this);
    }
    get SEX(): FieldUtil<UserCU>{  
        return new FieldUtil('SEX','sex','性别：0-未知, 1-男, 2-女', this);
    }
    get NICKNAME(): FieldUtil<UserCU>{  
        return new FieldUtil('NICKNAME','nickname','员工昵称', this);
    }
    get AVATAR(): FieldUtil<UserCU>{  
        return new FieldUtil('AVATAR','avatar','员工头像url', this);
    }
    get TELEPHONE(): FieldUtil<UserCU>{  
        return new FieldUtil('TELEPHONE','telephone','手机号', this);
    }
    get IDENTITY_NO(): FieldUtil<UserCU>{  
        return new FieldUtil('IDENTITY_NO','identityNo','身份证号', this);
    }
    get BIRTH_DAY(): FieldUtil<UserCU>{  
        return new FieldUtil('BIRTH_DAY','birthDay','生日', this);
    }
    get PASSWORD(): FieldUtil<UserCU>{  
        return new FieldUtil('PASSWORD','password','密码', this);
    }
    get EMAIL(): FieldUtil<UserCU>{  
        return new FieldUtil('EMAIL','email','电子邮件', this);
    }
    get BIZ_STATUS(): FieldUtil<UserCU>{  
        return new FieldUtil('BIZ_STATUS','bizStatus','业务状态：0-正常，1-关闭', this);
    }
    get CREATE_USER_ID(): FieldUtil<UserCU>{  
        return new FieldUtil('CREATE_USER_ID','createUserId','', this);
    }
    get UPDATE_USER_ID(): FieldUtil<UserCU>{  
        return new FieldUtil('UPDATE_USER_ID','updateUserId','', this);
    }
    get REMARK(): FieldUtil<UserCU>{  
        return new FieldUtil('REMARK','remark','备注', this);
    }
    get CREATE_TIME(): FieldUtil<UserCU>{  
        return new FieldUtil('CREATE_TIME','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<UserCU>{  
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', this);
    }
    get STATE(): FieldUtil<UserCU>{  
        return new FieldUtil('STATE','state','状态：0-正常，1-删除', this);
    }
    get LANGUAGE_CODE(): FieldUtil<UserCU>{  
        return new FieldUtil('LANGUAGE_CODE','languageCode','用户使用语言', this);
    }
    get TELEPHONE_AREA_CODE(): FieldUtil<UserCU>{  
        return new FieldUtil('TELEPHONE_AREA_CODE','telephoneAreaCode','手机区域号', this);
    }
}

@Singleton 
class UserMU extends TableUtilImpl<UserCU,User>{ 
    tableName  = 'user';
    tableFields  = ['id','code','name','sex','nickname','avatar','telephone','identity_no','birth_day','password','email','biz_status','create_user_id','update_user_id','remark','create_time','update_time','state','language_code','telephone_area_code'];
    modelFields  = ['id','code','name','sex','nickname','avatar','telephone','identityNo','birthDay','password','email','bizStatus','createUserId','updateUserId','remark','createTime','updateTime','state','languageCode','telephoneAreaCode'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): UserCU {
        return new UserCUImpl();
    }   

    static get ID(): FieldUtil<UserCU>{ 
        return new FieldUtil('ID','id','', new UserCUImpl());
    }
    static get CODE(): FieldUtil<UserCU>{ 
        return new FieldUtil('CODE','code','代码', new UserCUImpl());
    }
    static get NAME(): FieldUtil<UserCU>{ 
        return new FieldUtil('NAME','name','名称', new UserCUImpl());
    }
    static get SEX(): FieldUtil<UserCU>{ 
        return new FieldUtil('SEX','sex','性别：0-未知, 1-男, 2-女', new UserCUImpl());
    }
    static get NICKNAME(): FieldUtil<UserCU>{ 
        return new FieldUtil('NICKNAME','nickname','员工昵称', new UserCUImpl());
    }
    static get AVATAR(): FieldUtil<UserCU>{ 
        return new FieldUtil('AVATAR','avatar','员工头像url', new UserCUImpl());
    }
    static get TELEPHONE(): FieldUtil<UserCU>{ 
        return new FieldUtil('TELEPHONE','telephone','手机号', new UserCUImpl());
    }
    static get IDENTITY_NO(): FieldUtil<UserCU>{ 
        return new FieldUtil('IDENTITY_NO','identityNo','身份证号', new UserCUImpl());
    }
    static get BIRTH_DAY(): FieldUtil<UserCU>{ 
        return new FieldUtil('BIRTH_DAY','birthDay','生日', new UserCUImpl());
    }
    static get PASSWORD(): FieldUtil<UserCU>{ 
        return new FieldUtil('PASSWORD','password','密码', new UserCUImpl());
    }
    static get EMAIL(): FieldUtil<UserCU>{ 
        return new FieldUtil('EMAIL','email','电子邮件', new UserCUImpl());
    }
    static get BIZ_STATUS(): FieldUtil<UserCU>{ 
        return new FieldUtil('BIZ_STATUS','bizStatus','业务状态：0-正常，1-关闭', new UserCUImpl());
    }
    static get CREATE_USER_ID(): FieldUtil<UserCU>{ 
        return new FieldUtil('CREATE_USER_ID','createUserId','', new UserCUImpl());
    }
    static get UPDATE_USER_ID(): FieldUtil<UserCU>{ 
        return new FieldUtil('UPDATE_USER_ID','updateUserId','', new UserCUImpl());
    }
    static get REMARK(): FieldUtil<UserCU>{ 
        return new FieldUtil('REMARK','remark','备注', new UserCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<UserCU>{ 
        return new FieldUtil('CREATE_TIME','createTime','创建时间', new UserCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<UserCU>{ 
        return new FieldUtil('UPDATE_TIME','updateTime','更新时间', new UserCUImpl());
    }
    static get STATE(): FieldUtil<UserCU>{ 
        return new FieldUtil('STATE','state','状态：0-正常，1-删除', new UserCUImpl());
    }
    static get LANGUAGE_CODE(): FieldUtil<UserCU>{ 
        return new FieldUtil('LANGUAGE_CODE','languageCode','用户使用语言', new UserCUImpl());
    }
    static get TELEPHONE_AREA_CODE(): FieldUtil<UserCU>{ 
        return new FieldUtil('TELEPHONE_AREA_CODE','telephoneAreaCode','手机区域号', new UserCUImpl());
    }

    get ID(): FieldUtil<UserCU>{ 
        return UserMU.ID;
    }
    get CODE(): FieldUtil<UserCU>{ 
        return UserMU.CODE;
    }
    get NAME(): FieldUtil<UserCU>{ 
        return UserMU.NAME;
    }
    get SEX(): FieldUtil<UserCU>{ 
        return UserMU.SEX;
    }
    get NICKNAME(): FieldUtil<UserCU>{ 
        return UserMU.NICKNAME;
    }
    get AVATAR(): FieldUtil<UserCU>{ 
        return UserMU.AVATAR;
    }
    get TELEPHONE(): FieldUtil<UserCU>{ 
        return UserMU.TELEPHONE;
    }
    get IDENTITY_NO(): FieldUtil<UserCU>{ 
        return UserMU.IDENTITY_NO;
    }
    get BIRTH_DAY(): FieldUtil<UserCU>{ 
        return UserMU.BIRTH_DAY;
    }
    get PASSWORD(): FieldUtil<UserCU>{ 
        return UserMU.PASSWORD;
    }
    get EMAIL(): FieldUtil<UserCU>{ 
        return UserMU.EMAIL;
    }
    get BIZ_STATUS(): FieldUtil<UserCU>{ 
        return UserMU.BIZ_STATUS;
    }
    get CREATE_USER_ID(): FieldUtil<UserCU>{ 
        return UserMU.CREATE_USER_ID;
    }
    get UPDATE_USER_ID(): FieldUtil<UserCU>{ 
        return UserMU.UPDATE_USER_ID;
    }
    get REMARK(): FieldUtil<UserCU>{ 
        return UserMU.REMARK;
    }
    get CREATE_TIME(): FieldUtil<UserCU>{ 
        return UserMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<UserCU>{ 
        return UserMU.UPDATE_TIME;
    }
    get STATE(): FieldUtil<UserCU>{ 
        return UserMU.STATE;
    }
    get LANGUAGE_CODE(): FieldUtil<UserCU>{ 
        return UserMU.LANGUAGE_CODE;
    }
    get TELEPHONE_AREA_CODE(): FieldUtil<UserCU>{ 
        return UserMU.TELEPHONE_AREA_CODE;
    }
}
export {UserMU, UserCU}
