package com.fufan.mtsaas.modules.sysmgr.syuser.bo.request;

import com.fufan.mtsaas.modules.sysmgr.syuser.bo.reponse.RoleSelectResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

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

/**
 * @author Liby
 * 2022-03-03
 */
@Data
public class UserSaveRequest {

    @ApiModelProperty(value = "系统ID")
    private int id;

    @NotBlank(message = "手机号不能为空")
    @Length(max = 20, message = "用户账户，超出字段最大长度：20")
    @Pattern(regexp = "^[1-9]\\d{10}$", message = "用户账户所用的手机号格式不正确")
//    @ApiModelProperty(value = "用户账户，字段最大长度：20")
    private String userID;

    @Length(max = 100, message = "公司名称，超出字段最大长度：100")
    @ApiModelProperty(value = "公司名称，字段最大长度：100")
    private String companyName;

    @Pattern(regexp = "^[a-z0-9A-Z\\u4e00-\\u9fa5]+$", message = "用户姓名格式不正确")
    @Length(max = 20, message = "用户姓名，超出字段最大长度：20")
    @NotBlank(message = "用户姓名不能为空")
    @ApiModelProperty(value = "用户姓名，字段最大长度：20")
    private String name;

    @ApiModelProperty(value = "账号状态 0：启用 1：禁用")
    private String vldFG;

    @Length(max = 40, message = "邮箱，超出字段最大长度：40")
    @ApiModelProperty(value = "邮箱，字段最大长度：40")
    private String mailAddress;

    @ApiModelProperty(value = "所属部门ID")
    private String depID;

    @ApiModelProperty(value = "角色Id")
    private String roleId;

    @ApiModelProperty(value = "用户组ID")
    private String userGroupID;

    @ApiModelProperty(value = "所属岗位ID")
    private String stationID;

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

    @ApiModelProperty(value = "用户编号")
    private String empNo;

    @ApiModelProperty(value = "电话")
    private String phoneNo;

    @ApiModelProperty(value = "微信ID")
    private String WChatID;

    @ApiModelProperty(value = "是否绑定MAC")
    private String checkMAC;

    @ApiModelProperty(value = "MAC信息")
    private String MACID;

    @ApiModelProperty(value = "备注")
    private String note;

    @ApiModelProperty(value = "是否排除 Y-是，N-否")
    private String exclusiveFG;

    @ApiModelProperty(value = "账号类型：0-正式，1-测试")
    private Integer accountType;

    @ApiModelProperty(value = "是否职能部门审批人：0-是，1-否")
    private int isStation;

    @ApiModelProperty(value = "角色列表")
    private List<RoleSelectResponse> roleList;
}
