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

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

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

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

    private Long customId;

    @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 oldEmail;

    private Long id;

    @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 Date modifyTime;

    private Long modifyUser;

    private String modifyIp;
}
