| 21552 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.entity;
|
|
|
2 |
|
|
|
3 |
import java.time.LocalDateTime;
|
|
|
4 |
|
|
|
5 |
import javax.persistence.Column;
|
| 21633 |
ashik.ali |
6 |
import javax.persistence.Convert;
|
| 21552 |
ashik.ali |
7 |
import javax.persistence.Entity;
|
|
|
8 |
import javax.persistence.EnumType;
|
|
|
9 |
import javax.persistence.Enumerated;
|
|
|
10 |
import javax.persistence.GeneratedValue;
|
|
|
11 |
import javax.persistence.GenerationType;
|
|
|
12 |
import javax.persistence.Id;
|
|
|
13 |
import javax.persistence.NamedQueries;
|
|
|
14 |
import javax.persistence.NamedQuery;
|
|
|
15 |
import javax.persistence.Table;
|
|
|
16 |
|
| 21633 |
ashik.ali |
17 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
| 21552 |
ashik.ali |
18 |
import com.spice.profitmandi.dao.enumuration.ScanType;
|
|
|
19 |
|
|
|
20 |
@Entity
|
|
|
21 |
@Table(name="fofo.scan_record", schema = "fofo")
|
|
|
22 |
@NamedQueries({
|
|
|
23 |
@NamedQuery(name = "ScanRecord.selectCount", query = "select count(sr) from ScanRecord sr"),
|
|
|
24 |
@NamedQuery(name = "ScanRecord.selectByFofoId", query = "select sr from ScanRecord sr where sr.fofoId = :fofoId")
|
|
|
25 |
})
|
|
|
26 |
public class ScanRecord {
|
|
|
27 |
|
|
|
28 |
@Id
|
|
|
29 |
@Column(name="id", unique=true, updatable=false)
|
|
|
30 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
31 |
private int id;
|
|
|
32 |
|
|
|
33 |
@Column(name = "fofo_id")
|
|
|
34 |
private int fofoId;
|
|
|
35 |
|
| 21573 |
ashik.ali |
36 |
@Column(name = "inventory_item_id")
|
|
|
37 |
private int inventoryItemId;
|
|
|
38 |
|
|
|
39 |
@Column(name = "quantity")
|
|
|
40 |
private int quantity;
|
|
|
41 |
|
| 21552 |
ashik.ali |
42 |
@Column(name = "type")
|
|
|
43 |
@Enumerated(EnumType.STRING)
|
|
|
44 |
private ScanType type;
|
|
|
45 |
|
| 21633 |
ashik.ali |
46 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 21552 |
ashik.ali |
47 |
@Column(name = "create_timestamp")
|
| 21633 |
ashik.ali |
48 |
private LocalDateTime createTimestamp = LocalDateTime.now();
|
| 21552 |
ashik.ali |
49 |
|
|
|
50 |
public int getId() {
|
|
|
51 |
return id;
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
public void setId(int id) {
|
|
|
55 |
this.id = id;
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
public int getFofoId() {
|
|
|
59 |
return fofoId;
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
public void setFofoId(int fofoId) {
|
|
|
63 |
this.fofoId = fofoId;
|
|
|
64 |
}
|
| 21573 |
ashik.ali |
65 |
|
|
|
66 |
public int getInventoryItemId() {
|
|
|
67 |
return inventoryItemId;
|
|
|
68 |
}
|
|
|
69 |
public void setInventoryItemId(int inventoryItemId) {
|
|
|
70 |
this.inventoryItemId = inventoryItemId;
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
public int getQuantity() {
|
|
|
74 |
return quantity;
|
|
|
75 |
}
|
|
|
76 |
public void setQuantity(int quantity) {
|
|
|
77 |
this.quantity = quantity;
|
|
|
78 |
}
|
| 21552 |
ashik.ali |
79 |
|
|
|
80 |
public ScanType getType() {
|
|
|
81 |
return type;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
public void setType(ScanType type) {
|
|
|
85 |
this.type = type;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
public LocalDateTime getCreateTimestamp() {
|
|
|
89 |
return createTimestamp;
|
|
|
90 |
}
|
|
|
91 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
92 |
this.createTimestamp = createTimestamp;
|
|
|
93 |
}
|
| 21602 |
ashik.ali |
94 |
|
|
|
95 |
@Override
|
|
|
96 |
public String toString() {
|
|
|
97 |
return "ScanRecord [id=" + id + ", fofoId=" + fofoId + ", inventoryItemId=" + inventoryItemId + ", quantity="
|
|
|
98 |
+ quantity + ", type=" + type + ", createTimestamp=" + createTimestamp + "]";
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
|
| 21573 |
ashik.ali |
102 |
|
|
|
103 |
}
|