package com.ssyf.module.auth.domain.query;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Pattern;
import java.util.List;


/**
 * 用户更新实体类
 * @author huwei
 * @date 2022/11/14 13:08
 */
@Data
@Accessors(chain = true)
public class UserQuery {
    /**
     * 用户类型
     */
    private String type;

    private List<Integer> ids;

    /**
     * 用户名称
     */
//    @Length(min = 4 ,max=32 ,message = "{user.username.length}")
    private String username;

    /**
     * 电话号码
     */
    @Pattern(regexp = "^1[3456789]\\d{9}$" ,message = "{user.phone.pattern}")
    private String phone;

    /**
     * 邮箱
     */
    //@Pattern(regexp = "[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[\\w](?:[\\w-]*[\\w])?" ,message = "{user.mail.pattern}")
    private String mail;

    /**
     * key
     */
    private String secretKey;

    /**
     * 密码
     */
//    @Length(min = 4 ,max= 32 ,message = "{user.password.length}")
    private String password;

    /**
     * 昵称
     */
//    @Length(min = 4 ,max= 32 ,message = "{user.nickname.length}")
    private String nickname;

    /**
     * 账户状态；1 正常；2 冻结；3 已锁定；4 已注销；5 待审核；6 异常；
     * 参见{@link com.ssyf.common.core.enums.StatusAccountEnum}
     */
    private Integer status;
}
