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

import com.crm.rely.backend.core.constant.*;
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;

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


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

    private Integer valid;

    private Integer status;

    private Long agentId;

    private Float comPoint;

    private Integer hide;

    /**
     * 是否允许申请代理 0允许 1不允许
     */
    private Integer ibInvalid;

    private String sourceCode;

    private Long areaId;

    private String w;

    private String subId;

    private String oc;

    private String linkValue;

    private String excludeShowLoginTypes;

    /**
     * 域名
     */
    private String domainName;

    /**
     * 是否订阅邮件 0订阅 1不订阅
     */
    private Integer isSubscribeEmail;

}
