Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
34474 aman.kumar 1
package com.spice.profitmandi.dao.entity.scratch;
2
 
3
 
4
import javax.persistence.*;
5
import java.time.LocalDate;
6
 
7
@Entity
8
@NamedQuery(name = "OfferEntity.getOfferByDate", query = "SELECT oe FROM OfferEntity oe WHERE :date BETWEEN oe.startDate AND oe.endDate")
9
@Table(name = "web.offer")
10
public class OfferEntity {
11
    @Id
12
    @GeneratedValue(strategy = GenerationType.IDENTITY)
13
    private int id;
14
 
15
 
16
    @Column(name = "name")
17
    private String name;
18
    @Column(name = "offer_type")
19
    private String offerType;
20
 
21
    @Column(name = "description")
22
    private String description;
23
 
24
    @Column(name = "offer_image")
25
    private String offerImage;
26
 
27
    @Column(name = "start_date")
28
    private LocalDate startDate;
29
 
30
    @Column(name = "terms_condition")
31
    private String termsCondition;
32
 
33
    @Column(name = "end_date")
34
    private LocalDate endDate;
35
 
36
    @Column(name = "user_limit")
37
    private int userLimit;
38
 
39
    @Column(name = "scratch_validity")
40
    private int scratchValidity;
41
 
42
    @Column(name = "product_category")
43
    private String productCategory;
44
 
45
    @Column(name = "payment_method")
46
    private String paymentMethod;
47
 
48
    @Column(name = "is_active")
49
    private boolean active = true;
50
 
51
    @Column(name = "classification")
52
    private String classification;
53
 
54
    @Column(name = "is_deleted")
55
    private boolean deleted = false;
56
 
57
    public int getId() {
58
        return id;
59
    }
60
 
61
    public void setId(int id) {
62
        this.id = id;
63
    }
64
 
65
    public String getName() {
66
        return name;
67
    }
68
 
69
    public void setName(String name) {
70
        this.name = name;
71
    }
72
 
73
    public String getOfferType() {
74
        return offerType;
75
    }
76
 
77
    public void setOfferType(String offerType) {
78
        this.offerType = offerType;
79
    }
80
 
81
    public String getDescription() {
82
        return description;
83
    }
84
 
85
    public void setDescription(String description) {
86
        this.description = description;
87
    }
88
 
89
    public String getOfferImage() {
90
        return offerImage;
91
    }
92
 
93
    public void setOfferImage(String offerImage) {
94
        this.offerImage = offerImage;
95
    }
96
 
97
    public LocalDate getStartDate() {
98
        return startDate;
99
    }
100
 
101
    public void setStartDate(LocalDate startDate) {
102
        this.startDate = startDate;
103
    }
104
 
105
    public LocalDate getEndDate() {
106
        return endDate;
107
    }
108
 
109
    public void setEndDate(LocalDate endDate) {
110
        this.endDate = endDate;
111
    }
112
 
113
    public String getTermsCondition() {
114
        return termsCondition;
115
    }
116
 
117
    public void setTermsCondition(String termsCondition) {
118
        this.termsCondition = termsCondition;
119
    }
120
 
121
    public int getUserLimit() {
122
        return userLimit;
123
    }
124
 
125
    public void setUserLimit(int userLimit) {
126
        this.userLimit = userLimit;
127
    }
128
 
129
    public int getScratchValidity() {
130
        return scratchValidity;
131
    }
132
 
133
    public void setScratchValidity(int scratchValidity) {
134
        this.scratchValidity = scratchValidity;
135
    }
136
 
137
    public String getProductCategory() {
138
        return productCategory;
139
    }
140
 
141
    public void setProductCategory(String productCategory) {
142
        this.productCategory = productCategory;
143
    }
144
 
145
    public String getPaymentMethod() {
146
        return paymentMethod;
147
    }
148
 
149
    public void setPaymentMethod(String paymentMethod) {
150
        this.paymentMethod = paymentMethod;
151
    }
152
 
153
    public boolean getActive() {
154
        return active;
155
    }
156
 
157
    public void setActive(boolean active) {
158
        this.active = active;
159
    }
160
 
161
    public String getClassification() {
162
        return classification;
163
    }
164
 
165
    public void setClassification(String classification) {
166
        this.classification = classification;
167
    }
168
 
169
    public boolean getDeleted() {
170
        return deleted;
171
    }
172
 
173
    public void setDeleted(boolean deleted) {
174
        this.deleted = deleted;
175
    }
176
 
177
    @Override
178
    public String toString() {
179
        return "Offer{" +
180
                "id=" + id +
181
                ", name='" + name + '\'' +
182
                ", offerType='" + offerType + '\'' +
183
                ", description='" + description + '\'' +
184
                ", offerImage='" + offerImage + '\'' +
185
                ", startDate=" + startDate +
186
                ", endDate=" + endDate +
187
                ", termsCondition='" + termsCondition + '\'' +
188
                ", userLimit=" + userLimit +
189
                ", scratchValidity=" + scratchValidity +
190
                ", productCategory='" + productCategory + '\'' +
191
                ", paymentMethod='" + paymentMethod + '\'' +
192
                ", active='" + active + '\'' +
193
                ", classification=" + classification + '\'' +
194
                ", deleted=" + deleted + '\'' +
195
                '}';
196
    }
197
}