| 23418 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.entity.fofo;
|
|
|
2 |
|
|
|
3 |
import java.io.Serializable;
|
|
|
4 |
import java.time.LocalDateTime;
|
|
|
5 |
import java.time.format.DateTimeFormatter;
|
|
|
6 |
|
|
|
7 |
import javax.persistence.Column;
|
|
|
8 |
import javax.persistence.Convert;
|
|
|
9 |
import javax.persistence.Entity;
|
|
|
10 |
import javax.persistence.GeneratedValue;
|
|
|
11 |
import javax.persistence.GenerationType;
|
|
|
12 |
import javax.persistence.Id;
|
|
|
13 |
import javax.persistence.Table;
|
| 23880 |
ashik.ali |
14 |
import javax.persistence.Transient;
|
| 23418 |
ashik.ali |
15 |
import javax.persistence.UniqueConstraint;
|
|
|
16 |
|
|
|
17 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
|
|
18 |
|
|
|
19 |
@Entity
|
|
|
20 |
@Table(name="fofo.prebooking_order", schema = "fofo", uniqueConstraints = {@UniqueConstraint(columnNames = {"item_id", "customer_mobile_number"})})
|
|
|
21 |
public class PrebookingOrder implements Serializable{
|
|
|
22 |
|
|
|
23 |
private static final long serialVersionUID = 1L;
|
|
|
24 |
|
|
|
25 |
@Id
|
|
|
26 |
@Column(name = "id")
|
|
|
27 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
28 |
private int id;
|
|
|
29 |
|
|
|
30 |
@Column(name = "fofo_id")
|
|
|
31 |
private int fofoId;
|
|
|
32 |
|
|
|
33 |
@Column(name = "customer_name")
|
|
|
34 |
private String customerName;
|
|
|
35 |
|
|
|
36 |
@Column(name = "customer_mobile_number")
|
|
|
37 |
private String customerMobileNumber;
|
|
|
38 |
|
|
|
39 |
@Column(name = "customer_email_id")
|
|
|
40 |
private String customerEmailId;
|
|
|
41 |
|
|
|
42 |
@Column(name = "item_id")
|
|
|
43 |
private int itemId;
|
|
|
44 |
|
|
|
45 |
@Column(name = "quantity")
|
|
|
46 |
private int quantity;
|
|
|
47 |
|
|
|
48 |
@Column(name = "available_quantity")
|
|
|
49 |
private int availableQuantity;
|
|
|
50 |
|
|
|
51 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
52 |
@Column(name = "complete_timestamp")
|
|
|
53 |
private LocalDateTime completeTimestamp = null;
|
|
|
54 |
|
|
|
55 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
56 |
@Column(name = "create_timestamp")
|
|
|
57 |
private LocalDateTime createTimestamp = LocalDateTime.now();
|
|
|
58 |
|
| 23580 |
govind |
59 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
60 |
@Column(name = "notify_timestamp")
|
|
|
61 |
private LocalDateTime notifyTimeStamp = null;
|
|
|
62 |
|
| 23880 |
ashik.ali |
63 |
@Transient
|
|
|
64 |
private String description;
|
|
|
65 |
|
|
|
66 |
@Transient
|
|
|
67 |
private float advanceAmount;
|
|
|
68 |
|
|
|
69 |
@Transient
|
|
|
70 |
private float tentativeAmount;
|
|
|
71 |
|
| 23580 |
govind |
72 |
public LocalDateTime getNotifyTimeStamp() {
|
|
|
73 |
return notifyTimeStamp;
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
public void setNotifyTimeStamp(LocalDateTime notifyTimeStamp) {
|
|
|
77 |
this.notifyTimeStamp = notifyTimeStamp;
|
|
|
78 |
}
|
|
|
79 |
|
| 23418 |
ashik.ali |
80 |
public int getId() {
|
|
|
81 |
return id;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
public void setId(int id) {
|
|
|
85 |
this.id = id;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
public int getFofoId() {
|
|
|
89 |
return fofoId;
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
public void setFofoId(int fofoId) {
|
|
|
93 |
this.fofoId = fofoId;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
public String getCustomerName() {
|
|
|
97 |
return customerName;
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
public void setCustomerName(String customerName) {
|
|
|
101 |
this.customerName = customerName;
|
|
|
102 |
}
|
|
|
103 |
|
|
|
104 |
public String getCustomerMobileNumber() {
|
|
|
105 |
return customerMobileNumber;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
public void setCustomerMobileNumber(String customerMobileNumber) {
|
|
|
109 |
this.customerMobileNumber = customerMobileNumber;
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
public String getCustomerEmailId() {
|
|
|
113 |
return customerEmailId;
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
public void setCustomerEmailId(String customerEmailId) {
|
|
|
117 |
this.customerEmailId = customerEmailId;
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
public int getItemId() {
|
|
|
121 |
return itemId;
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
public void setItemId(int itemId) {
|
|
|
125 |
this.itemId = itemId;
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
public int getQuantity() {
|
|
|
129 |
return quantity;
|
|
|
130 |
}
|
|
|
131 |
|
|
|
132 |
public void setQuantity(int quantity) {
|
|
|
133 |
this.quantity = quantity;
|
|
|
134 |
}
|
|
|
135 |
|
|
|
136 |
public int getAvailableQuantity() {
|
|
|
137 |
return availableQuantity;
|
|
|
138 |
}
|
|
|
139 |
|
|
|
140 |
public void setAvailableQuantity(int availableQuantity) {
|
|
|
141 |
this.availableQuantity = availableQuantity;
|
|
|
142 |
}
|
|
|
143 |
|
|
|
144 |
public LocalDateTime getCompleteTimestamp() {
|
|
|
145 |
return completeTimestamp;
|
|
|
146 |
}
|
|
|
147 |
|
|
|
148 |
public void setCompleteTimestamp(LocalDateTime completeTimestamp) {
|
|
|
149 |
this.completeTimestamp = completeTimestamp;
|
|
|
150 |
}
|
|
|
151 |
|
|
|
152 |
public LocalDateTime getCreateTimestamp() {
|
|
|
153 |
return createTimestamp;
|
|
|
154 |
}
|
|
|
155 |
|
|
|
156 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
157 |
this.createTimestamp = createTimestamp;
|
|
|
158 |
}
|
|
|
159 |
|
|
|
160 |
public String getFormattedCreateTimestamp(){
|
|
|
161 |
if(createTimestamp == null){
|
|
|
162 |
return null;
|
|
|
163 |
}
|
|
|
164 |
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY HH:mm");
|
|
|
165 |
return createTimestamp.format(formatter);
|
|
|
166 |
}
|
| 23880 |
ashik.ali |
167 |
|
|
|
168 |
public String getDescription() {
|
|
|
169 |
return description;
|
|
|
170 |
}
|
|
|
171 |
public void setDescription(String description) {
|
|
|
172 |
this.description = description;
|
|
|
173 |
}
|
|
|
174 |
|
|
|
175 |
public float getAdvanceAmount() {
|
|
|
176 |
return advanceAmount;
|
|
|
177 |
}
|
|
|
178 |
public void setAdvanceAmount(float advanceAmount) {
|
|
|
179 |
this.advanceAmount = advanceAmount;
|
|
|
180 |
}
|
|
|
181 |
public float getTentativeAmount() {
|
|
|
182 |
return tentativeAmount;
|
|
|
183 |
}
|
|
|
184 |
public void setTentativeAmount(float tentativeAmount) {
|
|
|
185 |
this.tentativeAmount = tentativeAmount;
|
|
|
186 |
}
|
| 23418 |
ashik.ali |
187 |
|
|
|
188 |
@Override
|
|
|
189 |
public int hashCode() {
|
|
|
190 |
final int prime = 31;
|
|
|
191 |
int result = 1;
|
|
|
192 |
result = prime * result + id;
|
|
|
193 |
return result;
|
|
|
194 |
}
|
|
|
195 |
|
|
|
196 |
@Override
|
|
|
197 |
public boolean equals(Object obj) {
|
|
|
198 |
if (this == obj)
|
|
|
199 |
return true;
|
|
|
200 |
if (obj == null)
|
|
|
201 |
return false;
|
|
|
202 |
if (getClass() != obj.getClass())
|
|
|
203 |
return false;
|
|
|
204 |
PrebookingOrder other = (PrebookingOrder) obj;
|
|
|
205 |
if (id != other.id)
|
|
|
206 |
return false;
|
|
|
207 |
return true;
|
|
|
208 |
}
|
|
|
209 |
|
|
|
210 |
@Override
|
|
|
211 |
public String toString() {
|
|
|
212 |
return "PrebookingOrder [id=" + id + ", fofoId=" + fofoId + ", customerName=" + customerName
|
|
|
213 |
+ ", customerMobileNumber=" + customerMobileNumber + ", customerEmailId=" + customerEmailId
|
|
|
214 |
+ ", itemId=" + itemId + ", quantity=" + quantity + ", availableQuantity=" + availableQuantity
|
|
|
215 |
+ ", completeTimestamp=" + completeTimestamp + ", createTimestamp=" + createTimestamp + "]";
|
|
|
216 |
}
|
|
|
217 |
|
|
|
218 |
}
|