| 21714 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.entity.fofo;
|
| 21633 |
ashik.ali |
2 |
|
|
|
3 |
import java.io.Serializable;
|
|
|
4 |
import java.time.LocalDateTime;
|
|
|
5 |
|
|
|
6 |
import javax.persistence.Column;
|
| 21639 |
kshitij.so |
7 |
import javax.persistence.Convert;
|
| 21633 |
ashik.ali |
8 |
import javax.persistence.Entity;
|
|
|
9 |
import javax.persistence.GeneratedValue;
|
|
|
10 |
import javax.persistence.GenerationType;
|
|
|
11 |
import javax.persistence.Id;
|
|
|
12 |
import javax.persistence.Table;
|
|
|
13 |
|
| 21639 |
kshitij.so |
14 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
|
|
15 |
|
| 21633 |
ashik.ali |
16 |
/**
|
|
|
17 |
* This class basically contains api details
|
|
|
18 |
*
|
|
|
19 |
* @author ashikali
|
|
|
20 |
*
|
|
|
21 |
*/
|
|
|
22 |
@Entity
|
| 21637 |
kshitij.so |
23 |
@Table(name="fofo.purchase", schema = "fofo")
|
|
|
24 |
|
| 21633 |
ashik.ali |
25 |
public class Purchase implements Serializable{
|
|
|
26 |
|
|
|
27 |
private static final long serialVersionUID = 1L;
|
|
|
28 |
|
|
|
29 |
public Purchase() {
|
|
|
30 |
}
|
|
|
31 |
|
|
|
32 |
@Id
|
|
|
33 |
@Column(name="id")
|
|
|
34 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
35 |
private int id;
|
|
|
36 |
|
| 21640 |
kshitij.so |
37 |
@Column(name = "fofo_id")
|
|
|
38 |
private int fofoId;
|
|
|
39 |
|
| 21653 |
ashik.ali |
40 |
@Column(name="purchase_reference")
|
| 21633 |
ashik.ali |
41 |
private String purchaseReference;
|
|
|
42 |
|
|
|
43 |
@Column(name = "serialized_quantity")
|
|
|
44 |
private int serializedQuantity;
|
|
|
45 |
|
|
|
46 |
@Column(name = "non_serialized_quantity")
|
|
|
47 |
private int nonSerializedQuantity;
|
|
|
48 |
|
|
|
49 |
@Column(name = "unfullfilled_serialized_quantity")
|
|
|
50 |
private int unfullfilledSerializedQuantity;
|
|
|
51 |
|
|
|
52 |
@Column(name = "unfullfilled_non_serialized_quantity")
|
|
|
53 |
private int unfullfilledNonSerializedQuantity;
|
|
|
54 |
|
|
|
55 |
@Column(name = "completed", columnDefinition="tinyint(1) default 0")
|
|
|
56 |
private boolean completed;
|
|
|
57 |
|
| 21639 |
kshitij.so |
58 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 21633 |
ashik.ali |
59 |
@Column(name = "create_timestamp")
|
| 21640 |
kshitij.so |
60 |
private LocalDateTime createTimestamp = LocalDateTime.now();
|
| 21633 |
ashik.ali |
61 |
|
|
|
62 |
public int getId() {
|
|
|
63 |
return id;
|
|
|
64 |
}
|
|
|
65 |
public void setId(int id) {
|
|
|
66 |
this.id = id;
|
|
|
67 |
}
|
|
|
68 |
|
| 21640 |
kshitij.so |
69 |
public int getFofoId() {
|
|
|
70 |
return fofoId;
|
|
|
71 |
}
|
|
|
72 |
public void setFofoId(int fofoId) {
|
|
|
73 |
this.fofoId = fofoId;
|
|
|
74 |
}
|
|
|
75 |
|
| 21633 |
ashik.ali |
76 |
public String getPurchaseReference() {
|
|
|
77 |
return purchaseReference;
|
|
|
78 |
}
|
|
|
79 |
public void setPurchaseReference(String purchaseReference) {
|
|
|
80 |
this.purchaseReference = purchaseReference;
|
|
|
81 |
}
|
|
|
82 |
public int getSerializedQuantity() {
|
|
|
83 |
return serializedQuantity;
|
|
|
84 |
}
|
|
|
85 |
public void setSerializedQuantity(int serializedQuantity) {
|
|
|
86 |
this.serializedQuantity = serializedQuantity;
|
|
|
87 |
}
|
|
|
88 |
public int getNonSerializedQuantity() {
|
|
|
89 |
return nonSerializedQuantity;
|
|
|
90 |
}
|
|
|
91 |
public void setNonSerializedQuantity(int nonSerializedQuantity) {
|
|
|
92 |
this.nonSerializedQuantity = nonSerializedQuantity;
|
|
|
93 |
}
|
|
|
94 |
public int getUnfullfilledSerializedQuantity() {
|
|
|
95 |
return unfullfilledSerializedQuantity;
|
|
|
96 |
}
|
|
|
97 |
public void setUnfullfilledSerializedQuantity(int unfullfilledSerializedQuantity) {
|
|
|
98 |
this.unfullfilledSerializedQuantity = unfullfilledSerializedQuantity;
|
|
|
99 |
}
|
|
|
100 |
public int getUnfullfilledNonSerializedQuantity() {
|
|
|
101 |
return unfullfilledNonSerializedQuantity;
|
|
|
102 |
}
|
|
|
103 |
public void setUnfullfilledNonSerializedQuantity(int unfullfilledNonSerializedQuantity) {
|
|
|
104 |
this.unfullfilledNonSerializedQuantity = unfullfilledNonSerializedQuantity;
|
|
|
105 |
}
|
|
|
106 |
public boolean isCompleted() {
|
|
|
107 |
return completed;
|
|
|
108 |
}
|
|
|
109 |
public void setCompleted(boolean completed) {
|
|
|
110 |
this.completed = completed;
|
|
|
111 |
}
|
|
|
112 |
@Override
|
|
|
113 |
public String toString() {
|
|
|
114 |
return "Purchase [id=" + id + ", purchaseReference=" + purchaseReference + ", serializedQuantity="
|
|
|
115 |
+ serializedQuantity + ", nonSerializedQuantity=" + nonSerializedQuantity
|
|
|
116 |
+ ", unfullfilledSerializedQuantity=" + unfullfilledSerializedQuantity
|
|
|
117 |
+ ", unfullfilledNonSerializedQuantity=" + unfullfilledNonSerializedQuantity + ", completed="
|
|
|
118 |
+ completed + ", createTimestamp=" + createTimestamp + "]";
|
|
|
119 |
}
|
|
|
120 |
public LocalDateTime getCreateTimestamp() {
|
|
|
121 |
return createTimestamp;
|
|
|
122 |
}
|
|
|
123 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
124 |
this.createTimestamp = createTimestamp;
|
|
|
125 |
}
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
}
|