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;

@Data
public class CustomUpdateEmailPasswordEntity {
    @NotNull
    @NotBlank
    private String token;

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

    private Date modifyTime;

    private String modifyIp;

}
