| 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;
|
| 26674 |
tejbeer |
17 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
| 26588 |
tejbeer |
18 |
import com.spice.profitmandi.dao.enumuration.catalog.ItemCriteriaType;
|
|
|
19 |
|
|
|
20 |
@Entity
|
|
|
21 |
@Table(name = "catalog.offer", schema = "catalog")
|
|
|
22 |
public class Offer implements Serializable {
|
|
|
23 |
|
|
|
24 |
/**
|
|
|
25 |
*
|
|
|
26 |
*/
|
|
|
27 |
|
|
|
28 |
private static final long serialVersionUID = 1L;
|
|
|
29 |
|
|
|
30 |
@Id
|
|
|
31 |
@Column(name = "id")
|
|
|
32 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
33 |
private int id;
|
|
|
34 |
|
|
|
35 |
@Column(name = "name")
|
|
|
36 |
private String name;
|
|
|
37 |
|
|
|
38 |
@Column(name = "description")
|
|
|
39 |
private String description;
|
|
|
40 |
|
|
|
41 |
@Column(name = "item_param")
|
|
|
42 |
private String itemParam;
|
|
|
43 |
|
|
|
44 |
@Column(name = "price")
|
|
|
45 |
private int price;
|
|
|
46 |
|
| 26674 |
tejbeer |
47 |
@Column(name = "criteria")
|
|
|
48 |
private String criteria;
|
|
|
49 |
|
|
|
50 |
public PartnerType getPartnerType() {
|
|
|
51 |
return partnerType;
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
public void setPartnerType(PartnerType partnerType) {
|
|
|
55 |
this.partnerType = partnerType;
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
@Column(name = "category")
|
|
|
59 |
@Enumerated(EnumType.STRING)
|
|
|
60 |
private PartnerType partnerType;
|
|
|
61 |
|
| 26588 |
tejbeer |
62 |
public int getPrice() {
|
|
|
63 |
return price;
|
|
|
64 |
}
|
|
|
65 |
|
|
|
66 |
public void setPrice(int price) {
|
|
|
67 |
this.price = price;
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
public String getItemParam() {
|
|
|
71 |
return itemParam;
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
public void setItemParam(String itemParam) {
|
|
|
75 |
this.itemParam = itemParam;
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
@Column(name = "item_criteria")
|
|
|
79 |
@Enumerated(EnumType.STRING)
|
|
|
80 |
private ItemCriteriaType itemCriteria;
|
|
|
81 |
|
|
|
82 |
@Column(name = "amount_type")
|
|
|
83 |
private String amountType;
|
|
|
84 |
|
|
|
85 |
@Column(name = "target_type")
|
|
|
86 |
private String targetType;
|
|
|
87 |
|
|
|
88 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
89 |
@Column(name = "start_date_time")
|
|
|
90 |
private LocalDateTime startDateTime = LocalDateTime.now();
|
|
|
91 |
|
|
|
92 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
93 |
@Column(name = "end_date_time")
|
|
|
94 |
private LocalDateTime endDateTime = LocalDateTime.now();
|
|
|
95 |
|
|
|
96 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
97 |
@Column(name = "created_timestamp")
|
|
|
98 |
private LocalDateTime createdTimestamp = LocalDateTime.now();
|
|
|
99 |
|
|
|
100 |
public int getId() {
|
|
|
101 |
return id;
|
|
|
102 |
}
|
|
|
103 |
|
|
|
104 |
public void setId(int id) {
|
|
|
105 |
this.id = id;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
public String getName() {
|
|
|
109 |
return name;
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
public void setName(String name) {
|
|
|
113 |
this.name = name;
|
|
|
114 |
}
|
|
|
115 |
|
|
|
116 |
public String getDescription() {
|
|
|
117 |
return description;
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
public void setDescription(String description) {
|
|
|
121 |
this.description = description;
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
public ItemCriteriaType getItemCriteria() {
|
|
|
125 |
return itemCriteria;
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
public void setItemCreteria(ItemCriteriaType itemCreteria) {
|
|
|
129 |
this.itemCriteria = itemCreteria;
|
|
|
130 |
}
|
|
|
131 |
|
|
|
132 |
public String getAmountType() {
|
|
|
133 |
return amountType;
|
|
|
134 |
}
|
|
|
135 |
|
|
|
136 |
public void setAmountType(String amountType) {
|
|
|
137 |
this.amountType = amountType;
|
|
|
138 |
}
|
|
|
139 |
|
|
|
140 |
public String getTargetType() {
|
|
|
141 |
return targetType;
|
|
|
142 |
}
|
|
|
143 |
|
| 26674 |
tejbeer |
144 |
public String getCriteria() {
|
|
|
145 |
return criteria;
|
|
|
146 |
}
|
|
|
147 |
|
|
|
148 |
public void setCriteria(String criteria) {
|
|
|
149 |
this.criteria = criteria;
|
|
|
150 |
}
|
|
|
151 |
|
|
|
152 |
public void setItemCriteria(ItemCriteriaType itemCriteria) {
|
|
|
153 |
this.itemCriteria = itemCriteria;
|
|
|
154 |
}
|
|
|
155 |
|
| 26588 |
tejbeer |
156 |
public void setTargetType(String targetType) {
|
|
|
157 |
this.targetType = targetType;
|
|
|
158 |
}
|
|
|
159 |
|
|
|
160 |
public LocalDateTime getStartDateTime() {
|
|
|
161 |
return startDateTime;
|
|
|
162 |
}
|
|
|
163 |
|
|
|
164 |
public void setStartDateTime(LocalDateTime startDateTime) {
|
|
|
165 |
this.startDateTime = startDateTime;
|
|
|
166 |
}
|
|
|
167 |
|
|
|
168 |
public LocalDateTime getEndDateTime() {
|
|
|
169 |
return endDateTime;
|
|
|
170 |
}
|
|
|
171 |
|
|
|
172 |
public void setEndDateTime(LocalDateTime endDateTime) {
|
|
|
173 |
this.endDateTime = endDateTime;
|
|
|
174 |
}
|
|
|
175 |
|
|
|
176 |
public LocalDateTime getCreatedTimestamp() {
|
|
|
177 |
return createdTimestamp;
|
|
|
178 |
}
|
|
|
179 |
|
|
|
180 |
public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
|
|
|
181 |
this.createdTimestamp = createdTimestamp;
|
|
|
182 |
}
|
|
|
183 |
|
|
|
184 |
public static long getSerialversionuid() {
|
|
|
185 |
return serialVersionUID;
|
|
|
186 |
}
|
|
|
187 |
|
|
|
188 |
@Override
|
|
|
189 |
public String toString() {
|
|
|
190 |
return "Offer [id=" + id + ", name=" + name + ", description=" + description + ", itemParam=" + itemParam
|
| 26674 |
tejbeer |
191 |
+ ", price=" + price + ", criteria=" + criteria + ", partnerType=" + partnerType + ", itemCriteria="
|
|
|
192 |
+ itemCriteria + ", amountType=" + amountType + ", targetType=" + targetType + ", startDateTime="
|
|
|
193 |
+ startDateTime + ", endDateTime=" + endDateTime + ", createdTimestamp=" + createdTimestamp + "]";
|
| 26588 |
tejbeer |
194 |
}
|
|
|
195 |
|
|
|
196 |
}
|