| 34798 |
ranu |
1 |
package com.spice.profitmandi.dao.entity.dtr;
|
|
|
2 |
|
|
|
3 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
|
|
4 |
|
|
|
5 |
import javax.persistence.*;
|
|
|
6 |
import java.io.Serializable;
|
|
|
7 |
import java.time.LocalDateTime;
|
|
|
8 |
import java.util.Objects;
|
|
|
9 |
|
|
|
10 |
@Entity
|
|
|
11 |
@Table(name = "dtr.icici_policy_tracker")
|
|
|
12 |
public class IciciPolicyTracker implements Serializable {
|
|
|
13 |
|
|
|
14 |
private static final long serialVersionUID = 1L;
|
|
|
15 |
|
|
|
16 |
@Id
|
|
|
17 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
18 |
private int id;
|
|
|
19 |
|
|
|
20 |
@Column(name = "correlation_id", nullable = false, unique = true)
|
|
|
21 |
private String correlationId;
|
|
|
22 |
|
|
|
23 |
@Column(name = "policy_number")
|
|
|
24 |
private String policyNumber;
|
|
|
25 |
|
|
|
26 |
@Column(name = "customer_id")
|
|
|
27 |
private String customerId;
|
|
|
28 |
|
|
|
29 |
@Column(name = "status", nullable = false)
|
|
|
30 |
private String status = "PENDING"; // Default
|
|
|
31 |
|
|
|
32 |
@Column(name = "remarks", columnDefinition = "TEXT")
|
|
|
33 |
private String remarks;
|
|
|
34 |
|
|
|
35 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
36 |
@Column(name = "created_at", updatable = false)
|
|
|
37 |
private LocalDateTime createdAt = LocalDateTime.now();
|
|
|
38 |
|
|
|
39 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
40 |
@Column(name = "updated_at")
|
|
|
41 |
private LocalDateTime updatedAt = LocalDateTime.now();
|
|
|
42 |
|
|
|
43 |
@PreUpdate
|
|
|
44 |
public void onUpdate() {
|
|
|
45 |
updatedAt = LocalDateTime.now();
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
public int getId() {
|
|
|
49 |
return id;
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
public void setId(int id) {
|
|
|
53 |
this.id = id;
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
public String getCorrelationId() {
|
|
|
57 |
return correlationId;
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
public void setCorrelationId(String correlationId) {
|
|
|
61 |
this.correlationId = correlationId;
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
public String getPolicyNumber() {
|
|
|
65 |
return policyNumber;
|
|
|
66 |
}
|
|
|
67 |
|
|
|
68 |
public void setPolicyNumber(String policyNumber) {
|
|
|
69 |
this.policyNumber = policyNumber;
|
|
|
70 |
}
|
|
|
71 |
|
|
|
72 |
public String getCustomerId() {
|
|
|
73 |
return customerId;
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
public void setCustomerId(String customerId) {
|
|
|
77 |
this.customerId = customerId;
|
|
|
78 |
}
|
|
|
79 |
|
|
|
80 |
public String getStatus() {
|
|
|
81 |
return status;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
public void setStatus(String status) {
|
|
|
85 |
this.status = status;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
public String getRemarks() {
|
|
|
89 |
return remarks;
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
public void setRemarks(String remarks) {
|
|
|
93 |
this.remarks = remarks;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
public LocalDateTime getCreatedAt() {
|
|
|
97 |
return createdAt;
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
public void setCreatedAt(LocalDateTime createdAt) {
|
|
|
101 |
this.createdAt = createdAt;
|
|
|
102 |
}
|
|
|
103 |
|
|
|
104 |
public LocalDateTime getUpdatedAt() {
|
|
|
105 |
return updatedAt;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
public void setUpdatedAt(LocalDateTime updatedAt) {
|
|
|
109 |
this.updatedAt = updatedAt;
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
@Override
|
|
|
113 |
public boolean equals(Object o) {
|
|
|
114 |
if (this == o) return true;
|
|
|
115 |
if (o == null || getClass() != o.getClass()) return false;
|
|
|
116 |
IciciPolicyTracker that = (IciciPolicyTracker) o;
|
|
|
117 |
return id == that.id && Objects.equals(correlationId, that.correlationId) && Objects.equals(policyNumber, that.policyNumber) && Objects.equals(customerId, that.customerId) && Objects.equals(status, that.status) && Objects.equals(remarks, that.remarks) && Objects.equals(createdAt, that.createdAt) && Objects.equals(updatedAt, that.updatedAt);
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
@Override
|
|
|
121 |
public int hashCode() {
|
|
|
122 |
return Objects.hash(id, correlationId, policyNumber, customerId, status, remarks, createdAt, updatedAt);
|
|
|
123 |
}
|
|
|
124 |
|
|
|
125 |
@Override
|
|
|
126 |
public String toString() {
|
|
|
127 |
return "IciciPolicyTracker{" +
|
|
|
128 |
"id=" + id +
|
|
|
129 |
", correlationId='" + correlationId + '\'' +
|
|
|
130 |
", policyNumber='" + policyNumber + '\'' +
|
|
|
131 |
", customerId='" + customerId + '\'' +
|
|
|
132 |
", status='" + status + '\'' +
|
|
|
133 |
", remarks='" + remarks + '\'' +
|
|
|
134 |
", createdAt=" + createdAt +
|
|
|
135 |
", updatedAt=" + updatedAt +
|
|
|
136 |
'}';
|
|
|
137 |
}
|
|
|
138 |
}
|