Subversion Repositories SmartDukaan

Rev

Rev 35297 | Rev 35323 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22653 ashik.ali 1
package com.spice.profitmandi.dao.entity.fofo;
22418 ashik.ali 2
 
30046 tejbeer 3
import com.spice.profitmandi.common.enumuration.ActivationType;
29936 amit.gupta 4
import com.spice.profitmandi.common.enumuration.CounterSize;
5
import com.spice.profitmandi.common.enumuration.FofoType;
6
import com.spice.profitmandi.dao.entity.user.Address;
7
 
8
import javax.persistence.*;
22418 ashik.ali 9
import java.io.Serializable;
24349 amit.gupta 10
import java.time.LocalDate;
28166 tejbeer 11
import java.time.LocalDateTime;
35079 vikas 12
import java.util.Objects;
22418 ashik.ali 13
 
14
/**
15
 * This class basically contains store code details
32615 raveendra. 16
 *
22418 ashik.ali 17
 * @author ashikali
18
 */
19
@Entity
31730 tejbeer 20
@Table(name = "fofo.fofo_store")
27556 tejbeer 21
 
22
@NamedQueries({
23
 
32615 raveendra. 24
        @NamedQuery(name = "FofoStore.selectAllDtrUserIds", query = "select ua.userId from FofoStore fs join UserAccount ua on fs.id=ua.accountKey "
25
                + "where ua.type='saholic' and fs.internal=false and fs.active=true"),
29926 amit.gupta 26
 
32615 raveendra. 27
        @NamedQuery(name = "FofoStore.selectGroupByBrandWarehousePartnerSale", query = "select new com.spice.profitmandi.dao.model.BrandWisePartnerSaleModel(foi.brand, "
28
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"
29
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
30
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"
31
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
32
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
33
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
34
                + " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true "
35
                + "and foi.createTimestamp >= :lmtdStartDate and i.categoryId = :categoryId and fs.id in :fofoId"
36
                + " group by foi.brand"),
35284 aman 37
        @NamedQuery(name = "FofoStore.selectGroupByBrandWarehousePartnerAccessoriesSale", query = "select new com.spice.profitmandi.dao.model.BrandWisePartnerSaleModel(foi.brand, "
38
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"
39
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
40
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS integer ) else 0 end),"
41
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
42
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
43
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
44
                + " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true "
45
                + "and foi.createTimestamp >= :lmtdStartDate and i.categoryId != :categoryId and fs.id in :fofoId"),
27594 tejbeer 46
 
32615 raveendra. 47
        @NamedQuery(name = "FofoStore.selectGroupByWarehouseBrandWisePartnerSale", query = "select new com.spice.profitmandi.dao.model.WarehouseWiseBrandSaleModel("
48
                + "(case when a.city in ('Noida', 'Ghaziabad')  and foi.brand = 'Vivo' then 7573 else fs.warehouseId end) AS col_0_0_,"
49
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
50
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
51
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
52
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
53
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
54
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
55
                + " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId"
56
                + " join com.spice.profitmandi.dao.entity.user.User u on u.id = fs.id join Address a on a.id = u.addressId"
57
                + " where fo.cancelledTimestamp is null and fs.active = true"
58
                + " and foi.createTimestamp >= :lmtdStartDate and foi.brand = :brand and i.categoryId = :categoryId and fs.id in :fofoId"
59
                + " group by col_0_0_"),
27556 tejbeer 60
 
32615 raveendra. 61
        @NamedQuery(name = "FofoStore.selectWarehouseBrandItemSale", query = "select new com.spice.profitmandi.dao.model.WarehouseBrandWiseItemSaleModel(fs.warehouseId,i.id, i.brand, i.modelName, i.modelNumber,i.color,"
62
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
63
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
64
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
65
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
66
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
67
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
68
                + " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true"
69
                + " and  foi.createTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId and i.brand = :brand and i.categoryId = :categoryId and fs.id in :fofoId group by i.id"),
27594 tejbeer 70
 
32615 raveendra. 71
        @NamedQuery(name = "FofoStore.selectGroupByBrandAccesoriesWarehousePartnerSale", query = "select new com.spice.profitmandi.dao.model.BrandWisePartnerSaleModel(foi.brand, "
72
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
73
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
74
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
75
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
76
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
77
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
78
                + " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true "
79
                + "and foi.createTimestamp >= :lmtdStartDate and i.categoryId != :categoryId and fs.id in :fofoId"
80
                + " group by foi.brand"),
27556 tejbeer 81
 
32615 raveendra. 82
        @NamedQuery(name = "FofoStore.selectGroupByWarehouseAccesoriesBrandWisePartnerSale", query = "select new com.spice.profitmandi.dao.model.WarehouseWiseBrandSaleModel(fs.warehouseId,"
83
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
84
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
85
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
86
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
87
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
88
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
89
                + " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true"
90
                + " and foi.createTimestamp >= :lmtdStartDate and foi.brand = :brand and i.categoryId != :categoryId and fs.id in :fofoId"
91
                + " group by fs.warehouseId"),
27592 tejbeer 92
 
32615 raveendra. 93
        @NamedQuery(name = "FofoStore.selectWarehouseAccesoriesBrandItemSale", query = "select new com.spice.profitmandi.dao.model.WarehouseBrandWiseItemSaleModel(fs.warehouseId,i.id, i.brand, i.modelName, i.modelNumber,i.color,"
94
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
95
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity  else 0 end),"
96
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then CAST(foi.quantity*foi.mop  AS int) else 0 end),"
97
                + "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd  then foi.quantity else 0 end), "
98
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate  then CAST(foi.quantity*foi.mop  AS int) else 0 end), "
99
                + "sum(case when foi.createTimestamp between  :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
100
                + " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true"
101
                + " and  foi.createTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId and i.brand = :brand and i.categoryId != :categoryId  and fs.id in :fofoId group by i.id"),
27556 tejbeer 102
 
32615 raveendra. 103
        @NamedQuery(name = "FofoStore.selectPartnerPendingIndentItem", query = "select new com.spice.profitmandi.dao.model.PartnerPendingIndentItemModel(o.retailerName,"
104
                + " li.quantity, li.totalPrice)"
105
                + " from FofoStore fs join Order o on fs.id = o.retailerId join  LineItem li on li.orderId = o.id "
106
                + " where li.itemId = :itemId and fs.warehouseId = :warehouseId and o.status = 3"),
27599 tejbeer 107
 
32615 raveendra. 108
        @NamedQuery(name = "FofoStore.selectUnbilledActivateStockGroupByBrand", query = "select new com.spice.profitmandi.dao.model.BrandWiseUnbilledActivateStockModel(i.brand,"
109
                + "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
110
                + "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice  AS int) else 0 end))"
111
                + " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
112
                + " where fs.active = true and ii.goodQuantity >= 1 and fs.id in :fofoId group by i.brand"),
27670 tejbeer 113
 
32615 raveendra. 114
        @NamedQuery(name = "FofoStore.selectUnbilledActivateStockGroupByWarehouse", query = "select new com.spice.profitmandi.dao.model.WarehouseWiseBrandUnbilledActivatedModel(fs.warehouseId,"
115
                + "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
116
                + "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice  AS int) else 0 end))"
117
                + " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
118
                + " where fs.active = true and ii.goodQuantity >= 1 and i.brand = :brand and fs.id in :fofoId group by fs.warehouseId"),
27670 tejbeer 119
 
32615 raveendra. 120
        @NamedQuery(name = "FofoStore.selectWarehouseBrandItemUnbilledActivateStock", query = "select new com.spice.profitmandi.dao.model.WarehouseBrandItemUnbilledActivatedModel(fs.warehouseId,i.id, i.brand, i.modelName, i.modelNumber,i.color,"
121
                + "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
122
                + "  sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice  AS int) else 0 end))"
123
                + " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
124
                + " where fs.active = true and ii.goodQuantity >= 1 and i.brand = :brand and fs.warehouseId in :warehouseId and fs.id in :fofoId  group by i.id"),
27670 tejbeer 125
 
32615 raveendra. 126
        @NamedQuery(name = "FofoStore.selectGroupByBrandLms", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(foi.brand, DATE_FORMAT(fo.createTimestamp, :groupParameter),sum(cast(foi.mop*foi.quantity As int)))"
127
                + " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join Item i on i.id = foi.itemId  where fo.cancelledTimestamp is null and fs.active = true "
128
                + " and (foi.createTimestamp between :lmsStartDate and :endDate) and i.categoryId = :categoryId and fs.id in :fofoId and fs.warehouseId in :warehouseId"
129
                + " group by foi.brand,DATE_FORMAT(fo.createTimestamp, :groupParameter)"),})
27599 tejbeer 130
 
27556 tejbeer 131
public class FofoStore implements Serializable {
132
 
32615 raveendra. 133
    private static final long serialVersionUID = 1L;
134
    @Id
135
    @Column(name = "id", unique = true, updatable = false)
136
    private int id;
137
    private int codeInt;
138
    @Column(name = "code", unique = true)
139
    private String code;
140
    @Column(name = "latitude")
141
    private String latitude;
142
    @Column(name = "longitude")
143
    private String longitude;
144
    @Column(name = "counter_size")
145
    @Enumerated(EnumType.STRING)
146
    private CounterSize counterSize = CounterSize.TEN_LAC;
147
    @Column(name = "counter_potential")
148
    private float counterPotential;
149
    @Column(name = "warehouse_id")
150
    private int warehouseId;
151
    @Column(name = "minimum_investment")
152
    private float minimumInvestment;
153
    @Column(name = "grace_date")
154
    private LocalDate graceDate;
155
    @Column(name = "investment_ok")
156
    private boolean investmentOk;
157
    @Column
158
    private boolean active = true;
159
    @Column
160
    private String pan;
161
    @Transient
162
    private Address userAddress;
163
    @Column(name = "internal")
164
    private boolean internal;
165
    @Column(name = "bags_last_credited")
166
    private LocalDateTime bagsLastCredited;
167
    @Column(name = "fofo_type")
168
    @Enumerated(EnumType.STRING)
169
    private FofoType fofoType;
170
    @Column(name = "activation_type")
171
    @Enumerated(EnumType.STRING)
172
    private ActivationType activationType = ActivationType.BILLING_PENDING;
173
    @Column(name = "active_timestamp")
174
    private LocalDateTime activeTimeStamp;
175
    @Column(name = "target")
176
    private int target;
177
    @Column(name = "grace_count")
178
    private int graceCount;
33124 ranu 179
    @Column(name = "astId")
180
    private int astId;
35297 amit 181
 
35079 vikas 182
    @Column(name = "gst_number")
183
    private String gstNumber;
27556 tejbeer 184
 
35289 amit 185
    @Column(name = "trial")
186
    private boolean trial = false;
187
 
188
    @Column(name = "trial_start")
189
    private LocalDate trialStart;
190
 
191
    @Column(name = "trial_end")
192
    private LocalDate trialEnd;
193
 
35297 amit 194
    @Column(name = "minimum_investment_old")
195
    private float minimumInvestmentOld;
196
 
32615 raveendra. 197
    public FofoStore() {
198
    }
27556 tejbeer 199
 
33124 ranu 200
    public int getAstId() {
201
        return astId;
202
    }
203
 
204
    public void setAstId(int astId) {
205
        this.astId = astId;
206
    }
207
 
32615 raveendra. 208
    public int getCodeInt() {
209
        return codeInt;
210
    }
27556 tejbeer 211
 
32615 raveendra. 212
    public void setCodeInt(int codeInt) {
213
        this.codeInt = codeInt;
214
    }
27556 tejbeer 215
 
32615 raveendra. 216
    public int getTarget() {
217
        return target;
218
    }
27556 tejbeer 219
 
32615 raveendra. 220
    public void setTarget(int target) {
221
        this.target = target;
222
    }
27556 tejbeer 223
 
32615 raveendra. 224
    public ActivationType getActivationType() {
225
        return activationType;
226
    }
27556 tejbeer 227
 
32615 raveendra. 228
    public void setActivationType(ActivationType activationType) {
229
        this.activationType = activationType;
230
    }
31730 tejbeer 231
 
32615 raveendra. 232
    public float getCounterPotential() {
233
        return counterPotential;
234
    }
27556 tejbeer 235
 
32615 raveendra. 236
    public void setCounterPotential(float counterPotential) {
237
        this.counterPotential = counterPotential;
238
    }
27556 tejbeer 239
 
32615 raveendra. 240
    public LocalDateTime getBagsLastCredited() {
241
        return bagsLastCredited;
242
    }
27556 tejbeer 243
 
32615 raveendra. 244
    public void setBagsLastCredited(LocalDateTime bagsLastCredited) {
245
        this.bagsLastCredited = bagsLastCredited;
246
    }
27556 tejbeer 247
 
32615 raveendra. 248
    public boolean isInternal() {
249
        return internal;
250
    }
27903 tejbeer 251
 
32615 raveendra. 252
    public void setInternal(boolean internal) {
253
        this.internal = internal;
254
    }
29497 amit.gupta 255
 
32615 raveendra. 256
    public int getWarehouseId() {
257
        return warehouseId;
258
    }
30046 tejbeer 259
 
32615 raveendra. 260
    public void setWarehouseId(int warehouseId) {
261
        this.warehouseId = warehouseId;
262
    }
27903 tejbeer 263
 
32615 raveendra. 264
    public boolean isInvestmentOk() {
265
        return investmentOk;
266
    }
28825 tejbeer 267
 
32615 raveendra. 268
    public void setInvestmentOk(boolean investmentOk) {
269
        this.investmentOk = investmentOk;
270
    }
28825 tejbeer 271
 
32615 raveendra. 272
    public String getPan() {
273
        return pan;
274
    }
30046 tejbeer 275
 
32615 raveendra. 276
    public void setPan(String pan) {
277
        this.pan = pan;
278
    }
28166 tejbeer 279
 
32615 raveendra. 280
    public int getGraceCount() {
281
        return graceCount;
282
    }
32308 amit.gupta 283
 
32615 raveendra. 284
    public void setGraceCount(int graceCount) {
285
        this.graceCount = graceCount;
286
    }
32308 amit.gupta 287
 
32615 raveendra. 288
    public boolean isActive() {
289
        return active;
290
    }
32308 amit.gupta 291
 
32615 raveendra. 292
    public void setActive(boolean active) {
293
        this.active = active;
294
    }
30046 tejbeer 295
 
32615 raveendra. 296
    public LocalDate getGraceDate() {
297
        return graceDate;
298
    }
31730 tejbeer 299
 
32615 raveendra. 300
    public void setGraceDate(LocalDate graceDate) {
301
        this.graceDate = graceDate;
302
    }
31730 tejbeer 303
 
32615 raveendra. 304
    public float getMinimumInvestment() {
305
        return minimumInvestment;
306
    }
30046 tejbeer 307
 
35297 amit 308
    public float getMinimumInvestmentOld() {
309
        return minimumInvestmentOld;
310
    }
311
 
312
    public void setMinimumInvestmentOld(float minimumInvestmentOld) {
313
        this.minimumInvestmentOld = minimumInvestmentOld;
314
    }
315
 
32615 raveendra. 316
    public void setMinimumInvestment(float minimumInvestment) {
317
        this.minimumInvestment = minimumInvestment;
318
    }
28166 tejbeer 319
 
32615 raveendra. 320
    /*
321
     * public int getCreditCycle() { return creditCycle; } public void
322
     * setCreditCycle(int creditCycle) { this.creditCycle = creditCycle; }
323
     */
324
    public CounterSize getCounterSize() {
325
        return counterSize;
326
    }
28166 tejbeer 327
 
32615 raveendra. 328
    public void setCounterSize(CounterSize counterSize) {
329
        this.counterSize = counterSize;
330
    }
27903 tejbeer 331
 
32615 raveendra. 332
    public int getId() {
333
        return id;
334
    }
27903 tejbeer 335
 
32615 raveendra. 336
    public void setId(int id) {
337
        this.id = id;
338
    }
27903 tejbeer 339
 
32615 raveendra. 340
    public String getCode() {
341
        return code;
342
    }
27903 tejbeer 343
 
32615 raveendra. 344
    public void setCode(String code) {
345
        this.code = code;
346
    }
27556 tejbeer 347
 
32615 raveendra. 348
    public String getLatitude() {
349
        return latitude;
350
    }
25276 amit.gupta 351
 
32615 raveendra. 352
    public void setLatitude(String latitude) {
353
        this.latitude = latitude;
354
    }
24843 govind 355
 
32615 raveendra. 356
    public String getLongitude() {
357
        return longitude;
358
    }
29497 amit.gupta 359
 
32615 raveendra. 360
    public void setLongitude(String longitude) {
361
        this.longitude = longitude;
362
    }
29497 amit.gupta 363
 
32615 raveendra. 364
    public Address getUserAddress() {
365
        return userAddress;
366
    }
27556 tejbeer 367
 
32615 raveendra. 368
    public void setUserAddress(Address userAddress) {
369
        this.userAddress = userAddress;
370
    }
27556 tejbeer 371
 
32615 raveendra. 372
    public LocalDateTime getActiveTimeStamp() {
373
        return activeTimeStamp;
374
    }
27556 tejbeer 375
 
32615 raveendra. 376
    public void setActiveTimeStamp(LocalDateTime activeTimeStamp) {
377
        this.activeTimeStamp = activeTimeStamp;
378
    }
27556 tejbeer 379
 
32615 raveendra. 380
    public FofoType getFofoType() {
381
        return fofoType;
382
    }
27556 tejbeer 383
 
32615 raveendra. 384
    public void setFofoType(FofoType fofoType) {
385
        this.fofoType = fofoType;
386
    }
27556 tejbeer 387
 
35079 vikas 388
    public String getGstNumber() {
389
        return gstNumber;
390
    }
391
 
392
    public void setGstNumber(String gstNumber) {
393
        this.gstNumber = gstNumber;
394
    }
395
 
35289 amit 396
    public boolean isTrial() {
397
        return trial;
398
    }
399
 
400
    public void setTrial(boolean trial) {
401
        this.trial = trial;
402
    }
403
 
404
    public LocalDate getTrialStart() {
405
        return trialStart;
406
    }
407
 
408
    public void setTrialStart(LocalDate trialStart) {
409
        this.trialStart = trialStart;
410
    }
411
 
412
    public LocalDate getTrialEnd() {
413
        return trialEnd;
414
    }
415
 
416
    public void setTrialEnd(LocalDate trialEnd) {
417
        this.trialEnd = trialEnd;
418
    }
419
 
32615 raveendra. 420
    @Override
35079 vikas 421
    public boolean equals(Object o) {
35297 amit 422
        if (o == null || getClass() != o.getClass()) return false;
35079 vikas 423
        FofoStore fofoStore = (FofoStore) o;
35297 amit 424
        return id == fofoStore.id && codeInt == fofoStore.codeInt && Float.compare(counterPotential, fofoStore.counterPotential) == 0 && warehouseId == fofoStore.warehouseId && Float.compare(minimumInvestment, fofoStore.minimumInvestment) == 0 && investmentOk == fofoStore.investmentOk && active == fofoStore.active && internal == fofoStore.internal && target == fofoStore.target && graceCount == fofoStore.graceCount && astId == fofoStore.astId && trial == fofoStore.trial && Float.compare(minimumInvestmentOld, fofoStore.minimumInvestmentOld) == 0 && Objects.equals(code, fofoStore.code) && Objects.equals(latitude, fofoStore.latitude) && Objects.equals(longitude, fofoStore.longitude) && counterSize == fofoStore.counterSize && Objects.equals(graceDate, fofoStore.graceDate) && Objects.equals(pan, fofoStore.pan) && Objects.equals(userAddress, fofoStore.userAddress) && Objects.equals(bagsLastCredited, fofoStore.bagsLastCredited) && fofoType == fofoStore.fofoType && activationType == fofoStore.activationType && Objects.equals(activeTimeStamp, fofoStore.activeTimeStamp) && Objects.equals(gstNumber, fofoStore.gstNumber) && Objects.equals(trialStart, fofoStore.trialStart) && Objects.equals(trialEnd, fofoStore.trialEnd);
32615 raveendra. 425
    }
27556 tejbeer 426
 
32615 raveendra. 427
    @Override
35079 vikas 428
    public int hashCode() {
35297 amit 429
        return Objects.hash(id, codeInt, code, latitude, longitude, counterSize, counterPotential, warehouseId, minimumInvestment, graceDate, investmentOk, active, pan, userAddress, internal, bagsLastCredited, fofoType, activationType, activeTimeStamp, target, graceCount, astId, gstNumber, trial, trialStart, trialEnd, minimumInvestmentOld);
32615 raveendra. 430
    }
23884 amit.gupta 431
 
32615 raveendra. 432
    @Override
433
    public String toString() {
35079 vikas 434
        return "FofoStore{" +
435
                "id=" + id +
436
                ", codeInt=" + codeInt +
437
                ", code='" + code + '\'' +
438
                ", latitude='" + latitude + '\'' +
439
                ", longitude='" + longitude + '\'' +
440
                ", counterSize=" + counterSize +
441
                ", counterPotential=" + counterPotential +
442
                ", warehouseId=" + warehouseId +
443
                ", minimumInvestment=" + minimumInvestment +
444
                ", graceDate=" + graceDate +
445
                ", investmentOk=" + investmentOk +
446
                ", active=" + active +
447
                ", pan='" + pan + '\'' +
448
                ", userAddress=" + userAddress +
449
                ", internal=" + internal +
450
                ", bagsLastCredited=" + bagsLastCredited +
451
                ", fofoType=" + fofoType +
452
                ", activationType=" + activationType +
453
                ", activeTimeStamp=" + activeTimeStamp +
454
                ", target=" + target +
455
                ", graceCount=" + graceCount +
456
                ", astId=" + astId +
457
                ", gstNumber='" + gstNumber + '\'' +
35297 amit 458
                ", trial=" + trial +
459
                ", trialStart=" + trialStart +
460
                ", trialEnd=" + trialEnd +
461
                ", minimumInvestmentOld=" + minimumInvestmentOld +
35079 vikas 462
                '}';
32615 raveendra. 463
    }
35297 amit 464
 
35301 amit 465
    public boolean isExpired() {
466
        return LocalDate.now().isAfter(trialEnd);
35297 amit 467
    }
22418 ashik.ali 468
}