| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.Instant; |
| | | import java.util.Optional; |
| | | |
| | | import javax.persistence.Column; |
| | | import javax.persistence.Entity; |
| | |
| | | |
| | | import org.springframework.data.annotation.CreatedDate; |
| | | import org.springframework.data.annotation.LastModifiedDate; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.pollex.pam.enums.OtpLoginTypeEnum; |
| | |
| | | this.contactType = contactType; |
| | | } |
| | | |
| | | |
| | | public String toAccountString() { |
| | | return Optional.ofNullable(getPhone()) |
| | | .filter(StringUtils::hasText) |
| | | .orElseGet(this::getEmail); |
| | | } |
| | | |
| | | } |