| 33715 |
ranu |
1 |
package com.spice.profitmandi.dao.entity.fofo;
|
|
|
2 |
|
|
|
3 |
import com.spice.profitmandi.dao.enumuration.transaction.UpSaleCallStatus;
|
|
|
4 |
|
|
|
5 |
import javax.persistence.*;
|
|
|
6 |
import java.io.Serializable;
|
|
|
7 |
import java.time.LocalDateTime;
|
|
|
8 |
import java.util.Objects;
|
|
|
9 |
|
|
|
10 |
/**
|
|
|
11 |
* @author ranu
|
|
|
12 |
*/
|
|
|
13 |
@Entity
|
|
|
14 |
@Table(name = "fofo.upSaleCall")
|
|
|
15 |
@NamedQueries({
|
|
|
16 |
@NamedQuery(name = "upSaleCall.checkNumberIsExist", query = "SELECT COUNT(u) FROM UpSaleCall u WHERE u.mobile = :mobile AND u.originalOrderId = :orderId"),
|
|
|
17 |
@NamedQuery(name = "upSaleCall.checkOrderIsExist", query = "SELECT COUNT(u) FROM UpSaleCall u WHERE u.originalOrderId = :orderId"),
|
|
|
18 |
})
|
|
|
19 |
public class UpSaleCall implements Serializable {
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
private static final long serialVersionUID = 1L;
|
|
|
23 |
@Id
|
|
|
24 |
@Column(name = "id")
|
|
|
25 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
26 |
private int id;
|
|
|
27 |
|
|
|
28 |
@Column(name = "agentId")
|
|
|
29 |
private int agentId;
|
|
|
30 |
|
|
|
31 |
@Column(name = "originalOrderId")
|
|
|
32 |
private int originalOrderId;
|
|
|
33 |
|
|
|
34 |
@Column(name = "mobile")
|
|
|
35 |
private String mobile;
|
|
|
36 |
|
|
|
37 |
@Column(name = "status")
|
|
|
38 |
@Enumerated(EnumType.STRING)
|
|
|
39 |
private UpSaleCallStatus status;
|
|
|
40 |
|
|
|
41 |
@Column(name = "create_timestamp")
|
|
|
42 |
private LocalDateTime createdTimestamp = LocalDateTime.now();
|
|
|
43 |
|
|
|
44 |
@Column(name = "rescheduled_timestamp")
|
|
|
45 |
private LocalDateTime rescheduledTimestamp;
|
|
|
46 |
|
|
|
47 |
public int getId() {
|
|
|
48 |
return id;
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
public void setId(int id) {
|
|
|
52 |
this.id = id;
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
public int getAgentId() {
|
|
|
56 |
return agentId;
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
public void setAgentId(int agentId) {
|
|
|
60 |
this.agentId = agentId;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
public String getMobile() {
|
|
|
64 |
return mobile;
|
|
|
65 |
}
|
|
|
66 |
|
|
|
67 |
public void setMobile(String mobile) {
|
|
|
68 |
this.mobile = mobile;
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
public UpSaleCallStatus getStatus() {
|
|
|
72 |
return status;
|
|
|
73 |
}
|
|
|
74 |
|
|
|
75 |
public void setStatus(UpSaleCallStatus status) {
|
|
|
76 |
this.status = status;
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
public LocalDateTime getCreatedTimestamp() {
|
|
|
80 |
return createdTimestamp;
|
|
|
81 |
}
|
|
|
82 |
|
|
|
83 |
public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
|
|
|
84 |
this.createdTimestamp = createdTimestamp;
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
public int getOriginalOrderId() {
|
|
|
88 |
return originalOrderId;
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
public void setOriginalOrderId(int originalOrderId) {
|
|
|
92 |
this.originalOrderId = originalOrderId;
|
|
|
93 |
}
|
|
|
94 |
|
|
|
95 |
public LocalDateTime getRescheduledTimestamp() {
|
|
|
96 |
return rescheduledTimestamp;
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
public void setRescheduledTimestamp(LocalDateTime rescheduledTimestamp) {
|
|
|
100 |
this.rescheduledTimestamp = rescheduledTimestamp;
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
@Override
|
|
|
104 |
public String toString() {
|
|
|
105 |
return "UpSaleCall{" +
|
|
|
106 |
"id=" + id +
|
|
|
107 |
", agentId=" + agentId +
|
|
|
108 |
", originalOrderId=" + originalOrderId +
|
|
|
109 |
", mobile='" + mobile + '\'' +
|
|
|
110 |
", status=" + status +
|
|
|
111 |
", createdTimestamp=" + createdTimestamp +
|
|
|
112 |
", rescheduledTimestamp=" + rescheduledTimestamp +
|
|
|
113 |
'}';
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
@Override
|
|
|
118 |
public boolean equals(Object o) {
|
|
|
119 |
if (this == o) return true;
|
|
|
120 |
if (o == null || getClass() != o.getClass()) return false;
|
|
|
121 |
UpSaleCall that = (UpSaleCall) o;
|
|
|
122 |
return id == that.id && agentId == that.agentId && originalOrderId == that.originalOrderId && Objects.equals(mobile, that.mobile) && status == that.status && Objects.equals(createdTimestamp, that.createdTimestamp) && Objects.equals(rescheduledTimestamp, that.rescheduledTimestamp);
|
|
|
123 |
}
|
|
|
124 |
|
|
|
125 |
@Override
|
|
|
126 |
public int hashCode() {
|
|
|
127 |
return Objects.hash(id, agentId, originalOrderId, mobile, status, createdTimestamp, rescheduledTimestamp);
|
|
|
128 |
}
|
|
|
129 |
}
|