import { FieldInfo } from 'model-util-base'
import { ConditionUtil, ConditionUtilImpl, FieldUtil, TableUtilImpl, IdType, JoinTable, SubTable } from 'model-util'
import { Container, Singleton } from 'typescript-ioc' 
import { SysUser } from '../models/index' 
/**
 * @author auto generate
 * @version 1.0
 * @date 2021-09-15 13:26
 */
interface SysUserCU extends ConditionUtil<SysUserCU>{
    ID:FieldUtil<SysUserCU>;
    NAME:FieldUtil<SysUserCU>;
    EMAIL:FieldUtil<SysUserCU>;
    NICKNAME:FieldUtil<SysUserCU>;
    AVATAR:FieldUtil<SysUserCU>;
    IS_ADMIN:FieldUtil<SysUserCU>;
    PASSWORD:FieldUtil<SysUserCU>;
    STATUS:FieldUtil<SysUserCU>;
    PHONE:FieldUtil<SysUserCU>;
    WX_USER_ID:FieldUtil<SysUserCU>;
    KT_USER_ID:FieldUtil<SysUserCU>;
    API_KEY:FieldUtil<SysUserCU>;
    DEPARTMENT_NAME:FieldUtil<SysUserCU>;
    REMARK:FieldUtil<SysUserCU>;
    CREATE_TIME:FieldUtil<SysUserCU>;
    UPDATE_TIME:FieldUtil<SysUserCU>;
}

class SysUserCUImpl extends ConditionUtilImpl<SysUserCUImpl> implements SysUserCU{ 
    newInstance(): SysUserCUImpl {
        return new SysUserCUImpl();
    } 
    get ID(): FieldUtil<SysUserCU>{  
        return new FieldUtil('id','id','ID', this);
    }
    get NAME(): FieldUtil<SysUserCU>{  
        return new FieldUtil('name','name','姓名', this);
    }
    get EMAIL(): FieldUtil<SysUserCU>{  
        return new FieldUtil('email','email','邮箱地址', this);
    }
    get NICKNAME(): FieldUtil<SysUserCU>{  
        return new FieldUtil('nickname','nickname','昵称', this);
    }
    get AVATAR(): FieldUtil<SysUserCU>{  
        return new FieldUtil('avatar','avatar','用户头像', this);
    }
    get IS_ADMIN(): FieldUtil<SysUserCU>{  
        return new FieldUtil('is_admin','isAdmin','是否超级用户', this);
    }
    get PASSWORD(): FieldUtil<SysUserCU>{  
        return new FieldUtil('password','password','登录密码', this);
    }
    get STATUS(): FieldUtil<SysUserCU>{  
        return new FieldUtil('status','status','00 正常，01：失效', this);
    }
    get PHONE(): FieldUtil<SysUserCU>{  
        return new FieldUtil('phone','phone','电话', this);
    }
    get WX_USER_ID(): FieldUtil<SysUserCU>{  
        return new FieldUtil('wx_user_id','wxUserId','企业微信用户ID', this);
    }
    get KT_USER_ID(): FieldUtil<SysUserCU>{  
        return new FieldUtil('kt_user_id','ktUserId','科拓统一登录用户ID', this);
    }
    get API_KEY(): FieldUtil<SysUserCU>{  
        return new FieldUtil('api_key','apiKey','API秘钥', this);
    }
    get DEPARTMENT_NAME(): FieldUtil<SysUserCU>{  
        return new FieldUtil('department_name','departmentName','部门名称', this);
    }
    get REMARK(): FieldUtil<SysUserCU>{  
        return new FieldUtil('remark','remark','REMARK', this);
    }
    get CREATE_TIME(): FieldUtil<SysUserCU>{  
        return new FieldUtil('create_time','createTime','创建时间', this);
    }
    get UPDATE_TIME(): FieldUtil<SysUserCU>{  
        return new FieldUtil('update_time','updateTime','更新时间', this);
    }
}

@Singleton 
class SysUserMU extends TableUtilImpl<SysUserCU,SysUser>{ 
    tableName  = 'sys_user';
    tableFields  = ['id','name','email','nickname','avatar','is_admin','password','status','phone','wx_user_id','kt_user_id','api_key','department_name','remark','create_time','update_time'];
    modelFields  = ['id','name','email','nickname','avatar','isAdmin','password','status','phone','wxUserId','ktUserId','apiKey','departmentName','remark','createTime','updateTime'];
    modelIdFields  = ['id'];
    tableIdFields  = ['id'];
    idType = IdType.CUSTOM;
    joinTables = [];
    subTables = [];

    createConditionUtil(): SysUserCU {
        return new SysUserCUImpl();
    }   

    static get ID(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('id','id','ID', new SysUserCUImpl());
    }
    static get NAME(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('name','name','姓名', new SysUserCUImpl());
    }
    static get EMAIL(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('email','email','邮箱地址', new SysUserCUImpl());
    }
    static get NICKNAME(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('nickname','nickname','昵称', new SysUserCUImpl());
    }
    static get AVATAR(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('avatar','avatar','用户头像', new SysUserCUImpl());
    }
    static get IS_ADMIN(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('is_admin','isAdmin','是否超级用户', new SysUserCUImpl());
    }
    static get PASSWORD(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('password','password','登录密码', new SysUserCUImpl());
    }
    static get STATUS(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('status','status','00 正常，01：失效', new SysUserCUImpl());
    }
    static get PHONE(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('phone','phone','电话', new SysUserCUImpl());
    }
    static get WX_USER_ID(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('wx_user_id','wxUserId','企业微信用户ID', new SysUserCUImpl());
    }
    static get KT_USER_ID(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('kt_user_id','ktUserId','科拓统一登录用户ID', new SysUserCUImpl());
    }
    static get API_KEY(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('api_key','apiKey','API秘钥', new SysUserCUImpl());
    }
    static get DEPARTMENT_NAME(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('department_name','departmentName','部门名称', new SysUserCUImpl());
    }
    static get REMARK(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('remark','remark','REMARK', new SysUserCUImpl());
    }
    static get CREATE_TIME(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('create_time','createTime','创建时间', new SysUserCUImpl());
    }
    static get UPDATE_TIME(): FieldUtil<SysUserCU>{ 
        return new FieldUtil('update_time','updateTime','更新时间', new SysUserCUImpl());
    }

    get ID(): FieldUtil<SysUserCU>{ 
        return SysUserMU.ID;
    }
    get NAME(): FieldUtil<SysUserCU>{ 
        return SysUserMU.NAME;
    }
    get EMAIL(): FieldUtil<SysUserCU>{ 
        return SysUserMU.EMAIL;
    }
    get NICKNAME(): FieldUtil<SysUserCU>{ 
        return SysUserMU.NICKNAME;
    }
    get AVATAR(): FieldUtil<SysUserCU>{ 
        return SysUserMU.AVATAR;
    }
    get IS_ADMIN(): FieldUtil<SysUserCU>{ 
        return SysUserMU.IS_ADMIN;
    }
    get PASSWORD(): FieldUtil<SysUserCU>{ 
        return SysUserMU.PASSWORD;
    }
    get STATUS(): FieldUtil<SysUserCU>{ 
        return SysUserMU.STATUS;
    }
    get PHONE(): FieldUtil<SysUserCU>{ 
        return SysUserMU.PHONE;
    }
    get WX_USER_ID(): FieldUtil<SysUserCU>{ 
        return SysUserMU.WX_USER_ID;
    }
    get KT_USER_ID(): FieldUtil<SysUserCU>{ 
        return SysUserMU.KT_USER_ID;
    }
    get API_KEY(): FieldUtil<SysUserCU>{ 
        return SysUserMU.API_KEY;
    }
    get DEPARTMENT_NAME(): FieldUtil<SysUserCU>{ 
        return SysUserMU.DEPARTMENT_NAME;
    }
    get REMARK(): FieldUtil<SysUserCU>{ 
        return SysUserMU.REMARK;
    }
    get CREATE_TIME(): FieldUtil<SysUserCU>{ 
        return SysUserMU.CREATE_TIME;
    }
    get UPDATE_TIME(): FieldUtil<SysUserCU>{ 
        return SysUserMU.UPDATE_TIME;
    }
}
export {SysUserMU, SysUserCU}
