Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
25503 amit.gupta 1
package com.spice.profitmandi.dao.model;
22858 ashik.ali 2
 
25503 amit.gupta 3
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
4
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
5
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
6
 
30123 amit.gupta 7
import java.time.LocalDateTime;
31170 amit.gupta 8
import java.util.List;
30454 amit.gupta 9
import java.util.Objects;
30123 amit.gupta 10
import java.util.Set;
11
 
22858 ashik.ali 12
public class CreateSchemeRequest {
25503 amit.gupta 13
 
23886 amit.gupta 14
	public LocalDateTime getStartDate() {
15
		return startDate;
16
	}
25503 amit.gupta 17
 
23886 amit.gupta 18
	public void setStartDate(LocalDateTime startDate) {
19
		this.startDate = startDate;
20
	}
25503 amit.gupta 21
 
23886 amit.gupta 22
	public LocalDateTime getEndDate() {
23
		return endDate;
24
	}
25503 amit.gupta 25
 
23886 amit.gupta 26
	public void setEndDate(LocalDateTime endDate) {
27
		this.endDate = endDate;
28
	}
29
 
22858 ashik.ali 30
	private String name;
31
	private String description;
25503 amit.gupta 32
	private SchemeType type;
33
	private AmountType amountType;
30123 amit.gupta 34
	private PartnerType partnerType;
28465 amit.gupta 35
	private boolean cashback;
30123 amit.gupta 36
	private Set<Integer> catalogIds;
31170 amit.gupta 37
	private List<Integer> regionIds;
30123 amit.gupta 38
 
39
	public boolean isCashback() {
40
		return cashback;
41
	}
42
 
43
	public void setCashback(boolean cashback) {
44
		this.cashback = cashback;
45
	}
46
 
47
	public PartnerType getPartnerType() {
48
		return partnerType;
26679 amit.gupta 49
	}
50
 
30123 amit.gupta 51
	public void setPartnerType(PartnerType partnerType) {
52
		this.partnerType = partnerType;
26679 amit.gupta 53
	}
54
 
30123 amit.gupta 55
	private float amount;
56
	private LocalDateTime startDate;
57
	private LocalDateTime endDate;
58
 
22858 ashik.ali 59
	public String getName() {
60
		return name;
61
	}
25503 amit.gupta 62
 
63
	public SchemeType getType() {
64
		return type;
65
	}
66
 
67
	public void setType(SchemeType type) {
68
		this.type = type;
69
	}
70
 
71
	public AmountType getAmountType() {
72
		return amountType;
73
	}
74
 
75
	public void setAmountType(AmountType amountType) {
76
		this.amountType = amountType;
77
	}
78
 
22858 ashik.ali 79
	public void setName(String name) {
80
		this.name = name;
81
	}
25503 amit.gupta 82
 
22858 ashik.ali 83
	public String getDescription() {
84
		return description;
85
	}
25503 amit.gupta 86
 
22858 ashik.ali 87
	public void setDescription(String description) {
88
		this.description = description;
89
	}
25503 amit.gupta 90
 
22858 ashik.ali 91
	public float getAmount() {
92
		return amount;
93
	}
25503 amit.gupta 94
 
22858 ashik.ali 95
	public void setAmount(float amount) {
96
		this.amount = amount;
97
	}
25503 amit.gupta 98
 
30123 amit.gupta 99
	public Set<Integer> getCatalogIds() {
100
		return catalogIds;
22858 ashik.ali 101
	}
25503 amit.gupta 102
 
30123 amit.gupta 103
	public void setCatalogIds(Set<Integer> catalogIds) {
104
		this.catalogIds = catalogIds;
22858 ashik.ali 105
	}
30454 amit.gupta 106
 
107
	@Override
108
	public String toString() {
109
		return "CreateSchemeRequest{" +
110
				"name='" + name + '\'' +
111
				", description='" + description + '\'' +
112
				", type=" + type +
113
				", amountType=" + amountType +
114
				", partnerType=" + partnerType +
115
				", cashback=" + cashback +
116
				", catalogIds=" + catalogIds +
31170 amit.gupta 117
				", regionIds=" + regionIds +
30454 amit.gupta 118
				", amount=" + amount +
119
				", startDate=" + startDate +
120
				", endDate=" + endDate +
121
				'}';
122
	}
123
 
124
	@Override
125
	public boolean equals(Object o) {
126
		if (this == o) return true;
127
		if (o == null || getClass() != o.getClass()) return false;
128
		CreateSchemeRequest that = (CreateSchemeRequest) o;
31170 amit.gupta 129
		return cashback == that.cashback && Float.compare(that.amount, amount) == 0 && Objects.equals(name, that.name) && Objects.equals(description, that.description) && type == that.type && amountType == that.amountType && partnerType == that.partnerType && Objects.equals(catalogIds, that.catalogIds) && Objects.equals(regionIds, that.regionIds) && Objects.equals(startDate, that.startDate) && Objects.equals(endDate, that.endDate);
30454 amit.gupta 130
	}
131
 
132
	@Override
133
	public int hashCode() {
31170 amit.gupta 134
		return Objects.hash(name, description, type, amountType, partnerType, cashback, catalogIds, regionIds, amount, startDate, endDate);
30454 amit.gupta 135
	}
31170 amit.gupta 136
 
137
	public List<Integer> getRegionIds() {
138
		return regionIds;
139
	}
140
 
141
	public void setRegionIds(List<Integer> regionIds) {
142
		this.regionIds = regionIds;
143
	}
22858 ashik.ali 144
}