| 21596 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.entity;
|
|
|
2 |
|
|
|
3 |
import java.io.Serializable;
|
|
|
4 |
import java.time.LocalDateTime;
|
|
|
5 |
|
|
|
6 |
import javax.persistence.Column;
|
|
|
7 |
import javax.persistence.Entity;
|
|
|
8 |
import javax.persistence.GeneratedValue;
|
|
|
9 |
import javax.persistence.GenerationType;
|
|
|
10 |
import javax.persistence.Id;
|
|
|
11 |
import javax.persistence.NamedQueries;
|
|
|
12 |
import javax.persistence.NamedQuery;
|
|
|
13 |
import javax.persistence.Table;
|
|
|
14 |
|
|
|
15 |
@Entity
|
|
|
16 |
@Table(name="fofo.fofo_order", schema = "fofo")
|
|
|
17 |
@NamedQueries({
|
|
|
18 |
@NamedQuery(name = "FofoOrder.selectCount", query = "select count(fo) from FofoOrder fo"),
|
|
|
19 |
@NamedQuery(name = "FofoOrder.selectById", query = "select fo from FofoOrder fo where fo.id = :id"),
|
|
|
20 |
@NamedQuery(name = "FofoOrder.selectByFofoId", query = "select fo from FofoOrder fo where fo.fofoId = :fofoId"),
|
|
|
21 |
@NamedQuery(name = "FofoOrder.selectTotolAmountByFofoId", query = "select sum(fo.totalAmount) from FofoOrder fo where fo.fofoId = :fofoId group by fo.fofoId"),
|
|
|
22 |
@NamedQuery(name = "FofoOrder.selectByInvoiceNumber", query = "select fo from FofoOrder fo where fo.invoiceNumber = :invoiceNumber")
|
|
|
23 |
})
|
|
|
24 |
public class FofoOrder implements Serializable{
|
|
|
25 |
|
|
|
26 |
private static final long serialVersionUID = 1L;
|
|
|
27 |
|
|
|
28 |
@Id
|
|
|
29 |
@Column(name = "id")
|
|
|
30 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
31 |
private int id;
|
|
|
32 |
|
|
|
33 |
@Column(name = "fofo_id")
|
|
|
34 |
private int fofoId;
|
|
|
35 |
|
|
|
36 |
@Column(name = "customer_id")
|
|
|
37 |
private int customerId;
|
|
|
38 |
|
| 21710 |
ashik.ali |
39 |
@Column(name = "customer_address_id")
|
|
|
40 |
private int customerAddressId;
|
|
|
41 |
|
| 21596 |
ashik.ali |
42 |
@Column(name = "total_amount")
|
|
|
43 |
private float totalAmount;
|
|
|
44 |
|
| 21609 |
ashik.ali |
45 |
@Column(name = "invoice_number", length = 50)
|
| 21596 |
ashik.ali |
46 |
private String invoiceNumber;
|
|
|
47 |
|
|
|
48 |
@Column(name = "create_timestamp")
|
|
|
49 |
private LocalDateTime createTimestamp = LocalDateTime.now();
|
|
|
50 |
|
|
|
51 |
public int getId() {
|
|
|
52 |
return id;
|
|
|
53 |
}
|
|
|
54 |
public void setId(int id) {
|
|
|
55 |
this.id = id;
|
|
|
56 |
}
|
|
|
57 |
public int getFofoId() {
|
|
|
58 |
return fofoId;
|
|
|
59 |
}
|
|
|
60 |
public void setFofoId(int fofoId) {
|
|
|
61 |
this.fofoId = fofoId;
|
|
|
62 |
}
|
|
|
63 |
public int getCustomerId() {
|
|
|
64 |
return customerId;
|
|
|
65 |
}
|
|
|
66 |
public void setCustomerId(int customerId) {
|
|
|
67 |
this.customerId = customerId;
|
|
|
68 |
}
|
| 21710 |
ashik.ali |
69 |
public int getCustomerAddressId() {
|
|
|
70 |
return customerAddressId;
|
|
|
71 |
}
|
|
|
72 |
public void setCustomerAddressId(int customerAddressId) {
|
|
|
73 |
this.customerAddressId = customerAddressId;
|
|
|
74 |
}
|
| 21596 |
ashik.ali |
75 |
public float getTotalAmount() {
|
|
|
76 |
return totalAmount;
|
|
|
77 |
}
|
|
|
78 |
public void setTotalAmount(float totalAmount) {
|
|
|
79 |
this.totalAmount = totalAmount;
|
|
|
80 |
}
|
|
|
81 |
public String getInvoiceNumber() {
|
|
|
82 |
return invoiceNumber;
|
|
|
83 |
}
|
|
|
84 |
public void setInvoiceNumber(String invoiceNumber) {
|
|
|
85 |
this.invoiceNumber = invoiceNumber;
|
|
|
86 |
}
|
|
|
87 |
public LocalDateTime getCreateTimestamp() {
|
|
|
88 |
return createTimestamp;
|
|
|
89 |
}
|
|
|
90 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
91 |
this.createTimestamp = createTimestamp;
|
|
|
92 |
}
|
| 21602 |
ashik.ali |
93 |
@Override
|
|
|
94 |
public String toString() {
|
| 21710 |
ashik.ali |
95 |
return "FofoOrder [id=" + id + ", fofoId=" + fofoId + ", customerId=" + customerId + ", customerAddressId="
|
|
|
96 |
+ customerAddressId + ", totalAmount=" + totalAmount + ", invoiceNumber=" + invoiceNumber
|
|
|
97 |
+ ", createTimestamp=" + createTimestamp + "]";
|
| 21602 |
ashik.ali |
98 |
}
|
|
|
99 |
|
| 21710 |
ashik.ali |
100 |
|
| 21596 |
ashik.ali |
101 |
}
|