package com.ho.user.vo.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

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

/**
 * @ClassName: UserUpdateReqVO
 * TODO:类文件简单描述
 * @Author:
 * @CreateDate: 2019/9/20 16:42
 * @UpdateUser:
 * @UpdateDate: 2019/9/20 16:42
 * @Version: 0.0.1
 */
@Data
public class UserUpdateReqVO {

    @ApiModelProperty(value = "用户id")
    @NotBlank(message = "用户id不能为空")
    private String id;

    @ApiModelProperty(value = "用户名")
    @Length( max = 50,message = "用户名不能超过50个字符")
    private String username;

    @ApiModelProperty(value = "真实姓名")
    @Length( max = 50,message = "真实姓名不能超过50个字符")
    private String realName;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "手机号码")
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String phone;

    @ApiModelProperty(value = "所属机构")
    private Integer deptId;


    @ApiModelProperty(value = "昵称")
    @Length( max = 50,message = "昵称不能超过50个字符")
    private String nickName;

    @ApiModelProperty(value = "邮箱")
    @Email(message = "邮箱格式有误")
    private String email;

    @ApiModelProperty(value = "账户状态(1.正常 0.锁定 )")
    private Integer status;

    @ApiModelProperty(value = "性别(1.男 2.女)")
    private Integer sex;

    @ApiModelProperty(value = "备注")
    @Length(max = 200,message = "备注不能超过200个字符")
    private String remark;

    @ApiModelProperty(value = "所拥有的角色")
    private List<Integer> roleIds;

    @ApiModelProperty(value = "所拥有的岗位")
    private List<Integer> positionIds;

    @ApiModelProperty(value = "用户等级（0代表公司内部用户，1-5分表代表不同等级的客户用户）")
    private Integer userLevel;

    @ApiModelProperty(value = "有效期（1永久，2临时）")
    private Integer periodOfValidity;
}
