package com.crm.rely.backend.core.entity.account.deal.reset;

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

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

@Data
public class AccountDealPasswordResetAddEntity extends BaseAddEntity {

    private Long customId;

    private Long cId;

    private Long login;

    private String token;

    @NotBlank(message = Constants.PASSWORD_FORMAT_ERROR)
    @NotNull(message = Constants.PASSWORD_FORMAT_ERROR)
    @Pattern(regexp = RegexpConstants.REGEXP_MANAGER_PWD, message = Constants.PASSWORD_FORMAT_ERROR)
    private String newPassword;
}
