package com.crm.rely.backend.model.entity.custom.info;

import com.crm.rely.backend.core.constant.Constants;
import com.crm.rely.backend.core.constant.CustomConstant;
import com.crm.rely.backend.core.constant.RegexpConstants;
import com.crm.rely.backend.core.entity.base.BaseAddEntity;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @program: crm-backend
 * @description:
 * @author: houn
 * @create: 2019-07-30 17:01
 */
@Data
public class CustomInfoRegisterEntity extends BaseAddEntity {

    /*@NotNull(message = CustomConstant.COUNTRY_NOT_NULL)
    @NotBlank(message = CustomConstant.COUNTRY_NOT_NULL)*/
    private String country;

    @Pattern(regexp = RegexpConstants.REGEXP_PWD, message = Constants.PASSWORD_FORMAT_ERROR)
    @NotNull(message = Constants.PASSWORD_NOT_NULL_ERROR)
    @NotBlank(message = Constants.PASSWORD_NOT_NULL_ERROR)
    private String password;

    @Pattern(regexp = RegexpConstants.REGEXP_EMAIL, message = Constants.EMAIL_FORMAT_ERROR)
    @NotNull(message = Constants.EMAIL_NOT_NULL_ERROR)
    @NotBlank(message = Constants.EMAIL_NOT_NULL_ERROR)
    private String email;

    @NotNull(message = Constants.EMAIL_CODE_NOT_NULL_ERROR)
    @NotBlank(message = Constants.EMAIL_CODE_NOT_NULL_ERROR)
    private String emailCode;

    /*@NotNull(message = Constants.NAME_NOT_NULL)
    @NotBlank(message = Constants.NAME_NOT_NULL)*/
    private String name;

    /**
     * 区号
     */
    private String areaCode;
    private String firstName;

    /**
     * 手机(唯一)
     */
    private String phone;

    private String identity;

    private Integer valid;

    private Integer status;

    private Long agentId;
    private Integer position;


    private String sno;
}
