| 26588 |
tejbeer |
1 |
package com.spice.profitmandi.dao.entity.catalog;
|
|
|
2 |
|
|
|
3 |
import java.io.Serializable;
|
|
|
4 |
import java.time.LocalDateTime;
|
|
|
5 |
|
|
|
6 |
import javax.persistence.Column;
|
|
|
7 |
import javax.persistence.Convert;
|
|
|
8 |
import javax.persistence.Entity;
|
|
|
9 |
import javax.persistence.EnumType;
|
|
|
10 |
import javax.persistence.Enumerated;
|
|
|
11 |
import javax.persistence.GeneratedValue;
|
|
|
12 |
import javax.persistence.GenerationType;
|
|
|
13 |
import javax.persistence.Id;
|
|
|
14 |
import javax.persistence.Table;
|
|
|
15 |
|
|
|
16 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
|
|
17 |
import com.spice.profitmandi.dao.enumuration.catalog.ItemCriteriaType;
|
|
|
18 |
|
|
|
19 |
@Entity
|
|
|
20 |
@Table(name = "catalog.offer", schema = "catalog")
|
|
|
21 |
public class Offer implements Serializable {
|
|
|
22 |
|
|
|
23 |
/**
|
|
|
24 |
*
|
|
|
25 |
*/
|
|
|
26 |
|
|
|
27 |
private static final long serialVersionUID = 1L;
|
|
|
28 |
|
|
|
29 |
@Id
|
|
|
30 |
@Column(name = "id")
|
|
|
31 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
32 |
private int id;
|
|
|
33 |
|
|
|
34 |
@Column(name = "name")
|
|
|
35 |
private String name;
|
|
|
36 |
|
|
|
37 |
@Column(name = "description")
|
|
|
38 |
private String description;
|
|
|
39 |
|
|
|
40 |
@Column(name = "item_param")
|
|
|
41 |
private String itemParam;
|
|
|
42 |
|
|
|
43 |
@Column(name = "price")
|
|
|
44 |
private int price;
|
|
|
45 |
|
|
|
46 |
public int getPrice() {
|
|
|
47 |
return price;
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
public void setPrice(int price) {
|
|
|
51 |
this.price = price;
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
public String getItemParam() {
|
|
|
55 |
return itemParam;
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
public void setItemParam(String itemParam) {
|
|
|
59 |
this.itemParam = itemParam;
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
@Column(name = "item_criteria")
|
|
|
63 |
@Enumerated(EnumType.STRING)
|
|
|
64 |
private ItemCriteriaType itemCriteria;
|
|
|
65 |
|
|
|
66 |
@Column(name = "amount_type")
|
|
|
67 |
private String amountType;
|
|
|
68 |
|
|
|
69 |
@Column(name = "target_type")
|
|
|
70 |
private String targetType;
|
|
|
71 |
|
|
|
72 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
73 |
@Column(name = "start_date_time")
|
|
|
74 |
private LocalDateTime startDateTime = LocalDateTime.now();
|
|
|
75 |
|
|
|
76 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
77 |
@Column(name = "end_date_time")
|
|
|
78 |
private LocalDateTime endDateTime = LocalDateTime.now();
|
|
|
79 |
|
|
|
80 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
81 |
@Column(name = "created_timestamp")
|
|
|
82 |
private LocalDateTime createdTimestamp = LocalDateTime.now();
|
|
|
83 |
|
|
|
84 |
public int getId() {
|
|
|
85 |
return id;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
public void setId(int id) {
|
|
|
89 |
this.id = id;
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
public String getName() {
|
|
|
93 |
return name;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
public void setName(String name) {
|
|
|
97 |
this.name = name;
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
public String getDescription() {
|
|
|
101 |
return description;
|
|
|
102 |
}
|
|
|
103 |
|
|
|
104 |
public void setDescription(String description) {
|
|
|
105 |
this.description = description;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
public ItemCriteriaType getItemCriteria() {
|
|
|
109 |
return itemCriteria;
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
public void setItemCreteria(ItemCriteriaType itemCreteria) {
|
|
|
113 |
this.itemCriteria = itemCreteria;
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
public String getAmountType() {
|
|
|
117 |
return amountType;
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
public void setAmountType(String amountType) {
|
|
|
121 |
this.amountType = amountType;
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
public String getTargetType() {
|
|
|
125 |
return targetType;
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
public void setTargetType(String targetType) {
|
|
|
129 |
this.targetType = targetType;
|
|
|
130 |
}
|
|
|
131 |
|
|
|
132 |
public LocalDateTime getStartDateTime() {
|
|
|
133 |
return startDateTime;
|
|
|
134 |
}
|
|
|
135 |
|
|
|
136 |
public void setStartDateTime(LocalDateTime startDateTime) {
|
|
|
137 |
this.startDateTime = startDateTime;
|
|
|
138 |
}
|
|
|
139 |
|
|
|
140 |
public LocalDateTime getEndDateTime() {
|
|
|
141 |
return endDateTime;
|
|
|
142 |
}
|
|
|
143 |
|
|
|
144 |
public void setEndDateTime(LocalDateTime endDateTime) {
|
|
|
145 |
this.endDateTime = endDateTime;
|
|
|
146 |
}
|
|
|
147 |
|
|
|
148 |
public LocalDateTime getCreatedTimestamp() {
|
|
|
149 |
return createdTimestamp;
|
|
|
150 |
}
|
|
|
151 |
|
|
|
152 |
public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
|
|
|
153 |
this.createdTimestamp = createdTimestamp;
|
|
|
154 |
}
|
|
|
155 |
|
|
|
156 |
public static long getSerialversionuid() {
|
|
|
157 |
return serialVersionUID;
|
|
|
158 |
}
|
|
|
159 |
|
|
|
160 |
@Override
|
|
|
161 |
public String toString() {
|
|
|
162 |
return "Offer [id=" + id + ", name=" + name + ", description=" + description + ", itemParam=" + itemParam
|
|
|
163 |
+ ", price=" + price + ", itemCriteria=" + itemCriteria + ", amountType=" + amountType + ", targetType="
|
|
|
164 |
+ targetType + ", startDateTime=" + startDateTime + ", endDateTime=" + endDateTime
|
|
|
165 |
+ ", createdTimestamp=" + createdTimestamp + "]";
|
|
|
166 |
}
|
|
|
167 |
|
|
|
168 |
}
|