package com.cwhelp.admin.business.validator;

import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;


/**
 * @author yan.y
 * @date 2019/07/28
 */
@Data
public class BssPlatformValid implements Serializable {
    @NotEmpty(message = "名称不能为空")
    private String name;
    @NotEmpty(message = "联系人不能为空")
    private String contact;
    @Pattern(regexp = "^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$", message = "手机号码格式不正确")
    @NotEmpty(message = "联系人电话不能为空")
    private String contactTel;
    @Pattern(regexp = "(^(\\d{14}|\\d{17})(\\d|[xX])$)?", message = "身份证号码错误")
    @NotEmpty(message = "联系人身份证号码不能为空")
    private String contactCard;
    @Email(message = "邮箱格式不正确")
    @NotEmpty(message = "邮箱不能为空")
    private String email;
    @NotNull(message = "类型不能为空")
    @Digits(integer = 12, fraction = 2, message = "类型不是数字")
    private Integer type;
}