| 26629 |
tejbeer |
1 |
package com.spice.profitmandi.dao.entity.fofo;
|
|
|
2 |
|
|
|
3 |
import java.io.Serializable;
|
|
|
4 |
import java.time.LocalDateTime;
|
| 28339 |
tejbeer |
5 |
import java.util.List;
|
| 26629 |
tejbeer |
6 |
|
|
|
7 |
import javax.persistence.Column;
|
|
|
8 |
import javax.persistence.Convert;
|
|
|
9 |
import javax.persistence.Entity;
|
| 27046 |
tejbeer |
10 |
import javax.persistence.EnumType;
|
|
|
11 |
import javax.persistence.Enumerated;
|
| 26629 |
tejbeer |
12 |
import javax.persistence.GeneratedValue;
|
|
|
13 |
import javax.persistence.GenerationType;
|
|
|
14 |
import javax.persistence.Id;
|
|
|
15 |
import javax.persistence.Table;
|
| 26817 |
amit.gupta |
16 |
import javax.persistence.Transient;
|
| 26629 |
tejbeer |
17 |
import javax.persistence.UniqueConstraint;
|
|
|
18 |
|
|
|
19 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
| 27046 |
tejbeer |
20 |
import com.spice.profitmandi.dao.enumuration.transaction.OrderStatus;
|
| 26629 |
tejbeer |
21 |
|
|
|
22 |
@Entity
|
|
|
23 |
@Table(name = "fofo.pending_order_item", schema = "fofo", uniqueConstraints = {
|
|
|
24 |
@UniqueConstraint(name = "UK_ORDER_ID_AND_ITEM_ID", columnNames = { "order_id", "item_id" }) })
|
|
|
25 |
public class PendingOrderItem implements Serializable {
|
|
|
26 |
|
| 27046 |
tejbeer |
27 |
public OrderStatus getStatus() {
|
|
|
28 |
return status;
|
|
|
29 |
}
|
|
|
30 |
|
| 26817 |
amit.gupta |
31 |
public String getItemName() {
|
|
|
32 |
return itemName;
|
|
|
33 |
}
|
|
|
34 |
|
|
|
35 |
public void setItemName(String itemName) {
|
|
|
36 |
this.itemName = itemName;
|
|
|
37 |
}
|
|
|
38 |
|
| 26629 |
tejbeer |
39 |
private static final long serialVersionUID = 1L;
|
|
|
40 |
|
|
|
41 |
@Id
|
|
|
42 |
@Column(name = "id")
|
|
|
43 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
44 |
private int id;
|
|
|
45 |
|
|
|
46 |
@Column(name = "order_id")
|
|
|
47 |
private int orderId;
|
|
|
48 |
|
|
|
49 |
@Column(name = "item_id")
|
|
|
50 |
private int itemId;
|
| 27046 |
tejbeer |
51 |
|
| 28352 |
tejbeer |
52 |
@Column(name = "remark")
|
|
|
53 |
private String remark;
|
|
|
54 |
|
|
|
55 |
public String getRemark() {
|
|
|
56 |
return remark;
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
public void setRemark(String remark) {
|
|
|
60 |
this.remark = remark;
|
|
|
61 |
}
|
|
|
62 |
|
| 26817 |
amit.gupta |
63 |
@Transient
|
|
|
64 |
private String itemName;
|
| 27046 |
tejbeer |
65 |
|
| 26924 |
amit.gupta |
66 |
@Transient
|
|
|
67 |
private String imgUrl;
|
| 26629 |
tejbeer |
68 |
|
| 26924 |
amit.gupta |
69 |
public String getImgUrl() {
|
|
|
70 |
return imgUrl;
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
public void setImgUrl(String imgUrl) {
|
|
|
74 |
this.imgUrl = imgUrl;
|
|
|
75 |
}
|
|
|
76 |
|
| 26629 |
tejbeer |
77 |
@Column(name = "quantity")
|
|
|
78 |
private int quantity;
|
|
|
79 |
|
|
|
80 |
@Column(name = "selling_price")
|
|
|
81 |
private float sellingPrice;
|
|
|
82 |
|
| 28339 |
tejbeer |
83 |
@Transient
|
|
|
84 |
private PendingOrder pendingOrder;
|
|
|
85 |
|
|
|
86 |
public PendingOrder getPendingOrder() {
|
|
|
87 |
return pendingOrder;
|
|
|
88 |
}
|
|
|
89 |
|
|
|
90 |
public void setPendingOrder(PendingOrder pendingOrder) {
|
|
|
91 |
this.pendingOrder = pendingOrder;
|
|
|
92 |
}
|
|
|
93 |
|
| 26721 |
tejbeer |
94 |
@Column(name = "status")
|
| 27046 |
tejbeer |
95 |
@Enumerated(EnumType.STRING)
|
|
|
96 |
private OrderStatus status;
|
|
|
97 |
|
|
|
98 |
@Column(name = "status_description")
|
|
|
99 |
private String statusDescription;
|
| 28339 |
tejbeer |
100 |
|
| 28311 |
amit.gupta |
101 |
@Column(name = "cancelled_timestamp")
|
|
|
102 |
private LocalDateTime cancelledTimestamp;
|
| 27046 |
tejbeer |
103 |
|
|
|
104 |
@Column(name = "billed_timestamp")
|
|
|
105 |
private LocalDateTime billedTimestamp;
|
|
|
106 |
|
| 28344 |
tejbeer |
107 |
@Column(name = "verified_timestamp")
|
|
|
108 |
private LocalDateTime verifiedTimestamp;
|
|
|
109 |
|
|
|
110 |
public LocalDateTime getVerifiedTimestamp() {
|
|
|
111 |
return verifiedTimestamp;
|
|
|
112 |
}
|
|
|
113 |
|
|
|
114 |
public void setVerifiedTimestamp(LocalDateTime verifiedTimestamp) {
|
|
|
115 |
this.verifiedTimestamp = verifiedTimestamp;
|
|
|
116 |
}
|
|
|
117 |
|
| 28339 |
tejbeer |
118 |
@Column(name = "delivered_timestamp")
|
|
|
119 |
private LocalDateTime deliveredTimestamp;
|
|
|
120 |
|
|
|
121 |
@Column(name = "claimed_timestamp")
|
|
|
122 |
private LocalDateTime claimedTimestamp;
|
|
|
123 |
|
|
|
124 |
public LocalDateTime getClaimedTimestamp() {
|
|
|
125 |
return claimedTimestamp;
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
public void setClaimedTimestamp(LocalDateTime claimedTimestamp) {
|
|
|
129 |
this.claimedTimestamp = claimedTimestamp;
|
|
|
130 |
}
|
|
|
131 |
|
|
|
132 |
public LocalDateTime getDeliveredTimestamp() {
|
|
|
133 |
return deliveredTimestamp;
|
|
|
134 |
}
|
|
|
135 |
|
|
|
136 |
public void setDeliveredTimestamp(LocalDateTime deliveredTimestamp) {
|
|
|
137 |
this.deliveredTimestamp = deliveredTimestamp;
|
|
|
138 |
}
|
|
|
139 |
|
| 27046 |
tejbeer |
140 |
public String getStatusDescription() {
|
|
|
141 |
return statusDescription;
|
|
|
142 |
}
|
|
|
143 |
|
|
|
144 |
public LocalDateTime getBilledTimestamp() {
|
|
|
145 |
return billedTimestamp;
|
|
|
146 |
}
|
|
|
147 |
|
|
|
148 |
public void setBilledTimestamp(LocalDateTime billedTimestamp) {
|
|
|
149 |
this.billedTimestamp = billedTimestamp;
|
|
|
150 |
}
|
|
|
151 |
|
|
|
152 |
public void setStatusDescription(String statusDescription) {
|
|
|
153 |
this.statusDescription = statusDescription;
|
|
|
154 |
}
|
|
|
155 |
|
|
|
156 |
public void setStatus(OrderStatus status) {
|
|
|
157 |
this.status = status;
|
|
|
158 |
}
|
|
|
159 |
|
| 28311 |
amit.gupta |
160 |
public LocalDateTime getCancelledTimestamp() {
|
|
|
161 |
return cancelledTimestamp;
|
|
|
162 |
}
|
|
|
163 |
|
|
|
164 |
public void setCancelledTimestamp(LocalDateTime cancelledTimestamp) {
|
|
|
165 |
this.cancelledTimestamp = cancelledTimestamp;
|
|
|
166 |
}
|
|
|
167 |
|
| 26924 |
amit.gupta |
168 |
@Column(name = "scheduled_delivery_time")
|
|
|
169 |
private LocalDateTime scheduledDeliveryTime;
|
| 26721 |
tejbeer |
170 |
|
| 26629 |
tejbeer |
171 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
172 |
@Column(name = "create_timestamp")
|
|
|
173 |
private LocalDateTime createTimestamp = LocalDateTime.now();
|
|
|
174 |
|
| 26924 |
amit.gupta |
175 |
@Override
|
|
|
176 |
public int hashCode() {
|
|
|
177 |
final int prime = 31;
|
|
|
178 |
int result = 1;
|
| 28311 |
amit.gupta |
179 |
result = prime * result + ((billedTimestamp == null) ? 0 : billedTimestamp.hashCode());
|
|
|
180 |
result = prime * result + ((cancelledTimestamp == null) ? 0 : cancelledTimestamp.hashCode());
|
| 28339 |
tejbeer |
181 |
result = prime * result + ((claimedTimestamp == null) ? 0 : claimedTimestamp.hashCode());
|
| 26924 |
amit.gupta |
182 |
result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
|
| 28339 |
tejbeer |
183 |
result = prime * result + ((deliveredTimestamp == null) ? 0 : deliveredTimestamp.hashCode());
|
| 26924 |
amit.gupta |
184 |
result = prime * result + id;
|
|
|
185 |
result = prime * result + ((imgUrl == null) ? 0 : imgUrl.hashCode());
|
|
|
186 |
result = prime * result + itemId;
|
|
|
187 |
result = prime * result + ((itemName == null) ? 0 : itemName.hashCode());
|
|
|
188 |
result = prime * result + orderId;
|
| 28339 |
tejbeer |
189 |
result = prime * result + ((pendingOrder == null) ? 0 : pendingOrder.hashCode());
|
| 26924 |
amit.gupta |
190 |
result = prime * result + quantity;
|
| 28352 |
tejbeer |
191 |
result = prime * result + ((remark == null) ? 0 : remark.hashCode());
|
| 26924 |
amit.gupta |
192 |
result = prime * result + ((scheduledDeliveryTime == null) ? 0 : scheduledDeliveryTime.hashCode());
|
|
|
193 |
result = prime * result + Float.floatToIntBits(sellingPrice);
|
|
|
194 |
result = prime * result + ((status == null) ? 0 : status.hashCode());
|
| 28311 |
amit.gupta |
195 |
result = prime * result + ((statusDescription == null) ? 0 : statusDescription.hashCode());
|
| 28344 |
tejbeer |
196 |
result = prime * result + ((verifiedTimestamp == null) ? 0 : verifiedTimestamp.hashCode());
|
| 26924 |
amit.gupta |
197 |
return result;
|
|
|
198 |
}
|
|
|
199 |
|
|
|
200 |
@Override
|
|
|
201 |
public boolean equals(Object obj) {
|
|
|
202 |
if (this == obj)
|
|
|
203 |
return true;
|
|
|
204 |
if (obj == null)
|
|
|
205 |
return false;
|
|
|
206 |
if (getClass() != obj.getClass())
|
|
|
207 |
return false;
|
|
|
208 |
PendingOrderItem other = (PendingOrderItem) obj;
|
| 28311 |
amit.gupta |
209 |
if (billedTimestamp == null) {
|
|
|
210 |
if (other.billedTimestamp != null)
|
|
|
211 |
return false;
|
|
|
212 |
} else if (!billedTimestamp.equals(other.billedTimestamp))
|
|
|
213 |
return false;
|
|
|
214 |
if (cancelledTimestamp == null) {
|
|
|
215 |
if (other.cancelledTimestamp != null)
|
|
|
216 |
return false;
|
|
|
217 |
} else if (!cancelledTimestamp.equals(other.cancelledTimestamp))
|
|
|
218 |
return false;
|
| 28339 |
tejbeer |
219 |
if (claimedTimestamp == null) {
|
|
|
220 |
if (other.claimedTimestamp != null)
|
|
|
221 |
return false;
|
|
|
222 |
} else if (!claimedTimestamp.equals(other.claimedTimestamp))
|
|
|
223 |
return false;
|
| 26924 |
amit.gupta |
224 |
if (createTimestamp == null) {
|
|
|
225 |
if (other.createTimestamp != null)
|
|
|
226 |
return false;
|
|
|
227 |
} else if (!createTimestamp.equals(other.createTimestamp))
|
|
|
228 |
return false;
|
| 28339 |
tejbeer |
229 |
if (deliveredTimestamp == null) {
|
|
|
230 |
if (other.deliveredTimestamp != null)
|
|
|
231 |
return false;
|
|
|
232 |
} else if (!deliveredTimestamp.equals(other.deliveredTimestamp))
|
|
|
233 |
return false;
|
| 26924 |
amit.gupta |
234 |
if (id != other.id)
|
|
|
235 |
return false;
|
|
|
236 |
if (imgUrl == null) {
|
|
|
237 |
if (other.imgUrl != null)
|
|
|
238 |
return false;
|
|
|
239 |
} else if (!imgUrl.equals(other.imgUrl))
|
|
|
240 |
return false;
|
|
|
241 |
if (itemId != other.itemId)
|
|
|
242 |
return false;
|
|
|
243 |
if (itemName == null) {
|
|
|
244 |
if (other.itemName != null)
|
|
|
245 |
return false;
|
|
|
246 |
} else if (!itemName.equals(other.itemName))
|
|
|
247 |
return false;
|
|
|
248 |
if (orderId != other.orderId)
|
|
|
249 |
return false;
|
| 28339 |
tejbeer |
250 |
if (pendingOrder == null) {
|
|
|
251 |
if (other.pendingOrder != null)
|
|
|
252 |
return false;
|
|
|
253 |
} else if (!pendingOrder.equals(other.pendingOrder))
|
|
|
254 |
return false;
|
| 26924 |
amit.gupta |
255 |
if (quantity != other.quantity)
|
|
|
256 |
return false;
|
| 28352 |
tejbeer |
257 |
if (remark == null) {
|
|
|
258 |
if (other.remark != null)
|
|
|
259 |
return false;
|
|
|
260 |
} else if (!remark.equals(other.remark))
|
|
|
261 |
return false;
|
| 26924 |
amit.gupta |
262 |
if (scheduledDeliveryTime == null) {
|
|
|
263 |
if (other.scheduledDeliveryTime != null)
|
|
|
264 |
return false;
|
|
|
265 |
} else if (!scheduledDeliveryTime.equals(other.scheduledDeliveryTime))
|
|
|
266 |
return false;
|
|
|
267 |
if (Float.floatToIntBits(sellingPrice) != Float.floatToIntBits(other.sellingPrice))
|
|
|
268 |
return false;
|
| 28311 |
amit.gupta |
269 |
if (status != other.status)
|
|
|
270 |
return false;
|
|
|
271 |
if (statusDescription == null) {
|
|
|
272 |
if (other.statusDescription != null)
|
| 26924 |
amit.gupta |
273 |
return false;
|
| 28311 |
amit.gupta |
274 |
} else if (!statusDescription.equals(other.statusDescription))
|
| 26924 |
amit.gupta |
275 |
return false;
|
| 28344 |
tejbeer |
276 |
if (verifiedTimestamp == null) {
|
|
|
277 |
if (other.verifiedTimestamp != null)
|
|
|
278 |
return false;
|
|
|
279 |
} else if (!verifiedTimestamp.equals(other.verifiedTimestamp))
|
|
|
280 |
return false;
|
| 26924 |
amit.gupta |
281 |
return true;
|
|
|
282 |
}
|
|
|
283 |
|
|
|
284 |
public LocalDateTime getScheduledDeliveryTime() {
|
|
|
285 |
return scheduledDeliveryTime;
|
|
|
286 |
}
|
|
|
287 |
|
|
|
288 |
public void setScheduledDeliveryTime(LocalDateTime scheduledDeliveryTime) {
|
|
|
289 |
this.scheduledDeliveryTime = scheduledDeliveryTime;
|
|
|
290 |
}
|
|
|
291 |
|
| 26629 |
tejbeer |
292 |
public int getId() {
|
|
|
293 |
return id;
|
|
|
294 |
}
|
|
|
295 |
|
|
|
296 |
public void setId(int id) {
|
|
|
297 |
this.id = id;
|
|
|
298 |
}
|
|
|
299 |
|
|
|
300 |
public int getOrderId() {
|
|
|
301 |
return orderId;
|
|
|
302 |
}
|
|
|
303 |
|
|
|
304 |
public void setOrderId(int orderId) {
|
|
|
305 |
this.orderId = orderId;
|
|
|
306 |
}
|
|
|
307 |
|
|
|
308 |
public int getItemId() {
|
|
|
309 |
return itemId;
|
|
|
310 |
}
|
|
|
311 |
|
|
|
312 |
public void setItemId(int itemId) {
|
|
|
313 |
this.itemId = itemId;
|
|
|
314 |
}
|
|
|
315 |
|
|
|
316 |
public int getQuantity() {
|
|
|
317 |
return quantity;
|
|
|
318 |
}
|
|
|
319 |
|
|
|
320 |
public void setQuantity(int quantity) {
|
|
|
321 |
this.quantity = quantity;
|
|
|
322 |
}
|
|
|
323 |
|
|
|
324 |
public float getSellingPrice() {
|
|
|
325 |
return sellingPrice;
|
|
|
326 |
}
|
|
|
327 |
|
|
|
328 |
public void setSellingPrice(float sellingPrice) {
|
|
|
329 |
this.sellingPrice = sellingPrice;
|
|
|
330 |
}
|
|
|
331 |
|
|
|
332 |
public LocalDateTime getCreateTimestamp() {
|
|
|
333 |
return createTimestamp;
|
|
|
334 |
}
|
|
|
335 |
|
|
|
336 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
337 |
this.createTimestamp = createTimestamp;
|
|
|
338 |
}
|
|
|
339 |
|
|
|
340 |
public static long getSerialversionuid() {
|
|
|
341 |
return serialVersionUID;
|
|
|
342 |
}
|
|
|
343 |
|
|
|
344 |
@Override
|
|
|
345 |
public String toString() {
|
| 28352 |
tejbeer |
346 |
return "PendingOrderItem [id=" + id + ", orderId=" + orderId + ", itemId=" + itemId + ", remark=" + remark
|
|
|
347 |
+ ", itemName=" + itemName + ", imgUrl=" + imgUrl + ", quantity=" + quantity + ", sellingPrice="
|
|
|
348 |
+ sellingPrice + ", pendingOrder=" + pendingOrder + ", status=" + status + ", statusDescription="
|
|
|
349 |
+ statusDescription + ", cancelledTimestamp=" + cancelledTimestamp + ", billedTimestamp="
|
|
|
350 |
+ billedTimestamp + ", verifiedTimestamp=" + verifiedTimestamp + ", deliveredTimestamp="
|
|
|
351 |
+ deliveredTimestamp + ", claimedTimestamp=" + claimedTimestamp + ", scheduledDeliveryTime="
|
|
|
352 |
+ scheduledDeliveryTime + ", createTimestamp=" + createTimestamp + "]";
|
| 26629 |
tejbeer |
353 |
}
|
|
|
354 |
|
|
|
355 |
}
|