package com.pollex.pam.service.dto;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.pollex.pam.enums.ContactStatusEnum;
|
|
import java.time.Instant;
|
import java.time.temporal.ChronoUnit;
|
import java.util.List;
|
|
public class ConsultantDTO {
|
|
@JsonProperty("new")
|
private boolean newConsultant;
|
private String agentNo;
|
private String name;
|
private String img;
|
private List<String> expertise;
|
private Float avgScore;
|
private ContactStatusEnum contactStatus;
|
private Instant updateTime;
|
private String role;
|
private String seniority;
|
|
public boolean isNewConsultant() {
|
if(updateTime != null){
|
Instant nowTimestamp = Instant.now();
|
return ChronoUnit.DAYS.between(updateTime, nowTimestamp) < 3;
|
}
|
return false;
|
}
|
|
public String getAgentNo() {
|
return agentNo;
|
}
|
|
public void setAgentNo(String agentNo) {
|
this.agentNo = agentNo;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
public String getImg() {
|
return img;
|
}
|
|
public void setImg(String img) {
|
this.img = img;
|
}
|
|
public List<String> getExpertise() {
|
return expertise;
|
}
|
|
public void setExpertise(List<String> expertise) {
|
this.expertise = expertise;
|
}
|
|
public Float getAvgScore() {
|
return avgScore;
|
}
|
|
public void setAvgScore(Float avgScore) {
|
this.avgScore = avgScore;
|
}
|
|
public ContactStatusEnum getContactStatus() {
|
return contactStatus;
|
}
|
|
public void setContactStatus(ContactStatusEnum contactStatus) {
|
this.contactStatus = contactStatus;
|
}
|
|
public Instant getUpdateTime() {
|
return updateTime;
|
}
|
|
public void setUpdateTime(Instant updateTime) {
|
this.updateTime = updateTime;
|
}
|
|
public String getRole() {
|
return role;
|
}
|
|
public void setRole(String role) {
|
this.role = role;
|
}
|
|
public String getSeniority() {
|
return seniority;
|
}
|
|
public void setSeniority(String seniority) {
|
this.seniority = seniority;
|
}
|
|
public void setNewConsultant(boolean newConsultant) {
|
this.newConsultant = newConsultant;
|
}
|
}
|