Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
30652 amit.gupta 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
3
import com.spice.profitmandi.dao.enumuration.transaction.SchemePayoutStatus;
4
 
5
import javax.persistence.*;
6
import java.time.LocalDateTime;
7
import java.util.Objects;
8
 
9
@Entity(name = "fofo.offer_payout")
10
public class OfferPayout {
11
	@Id
12
	@GeneratedValue(strategy = GenerationType.IDENTITY)
13
	private long id;
14
	@Column(name = "fofo_id", nullable = false)
15
	private long fofoId;
16
	@Column(name = "offer_id", nullable = false)
17
	private long offerId;
18
	@Column(name = "criteria_id", nullable = false)
19
	private long criteriaId;
20
	@Column(name = "slab_amount", nullable = false)
21
	private double slabAmount;
22
	@Column(name = "serial_number", nullable = false)
23
	private String serialNumber;
24
	@Column(name = "amount", nullable = false)
25
	private double amount;
26
	@Column(name = "status", nullable = false)
27
	@Enumerated(EnumType.STRING)
28
	private SchemePayoutStatus status;
29
	@Column(name = "description", nullable = false)
30
	private String description;
31
	@Column(name = "create_timestamp", nullable = false)
32
	private LocalDateTime createTimestamp;
30996 amit.gupta 33
	@Column(name = "reject_timestamp")
34
	private LocalDateTime rejectTimestamp;
30652 amit.gupta 35
 
30996 amit.gupta 36
	public OfferPayout() {
37
 
38
	}
39
 
40
	@Override
41
	public boolean equals(Object o) {
42
		if (this == o) return true;
43
		if (o == null || getClass() != o.getClass()) return false;
44
		OfferPayout that = (OfferPayout) o;
45
		return id == that.id && fofoId == that.fofoId && offerId == that.offerId && criteriaId == that.criteriaId && Double.compare(that.slabAmount, slabAmount) == 0 && Double.compare(that.amount, amount) == 0 && Objects.equals(serialNumber, that.serialNumber) && status == that.status && Objects.equals(description, that.description) && Objects.equals(createTimestamp, that.createTimestamp) && Objects.equals(rejectTimestamp, that.rejectTimestamp);
46
	}
47
 
30652 amit.gupta 48
	public OfferPayout(long fofoId, long offerId, long criteriaId, double slabAmount, String serialNumber, double amount, SchemePayoutStatus status, String description, LocalDateTime createTimestamp) {
49
		this.fofoId = fofoId;
50
		this.offerId = offerId;
51
		this.criteriaId = criteriaId;
52
		this.slabAmount = slabAmount;
53
		this.serialNumber = serialNumber;
54
		this.amount = amount;
55
		this.status = status;
56
		this.description = description;
57
		this.createTimestamp = createTimestamp;
58
	}
59
 
60
	@Override
30996 amit.gupta 61
	public int hashCode() {
62
		return Objects.hash(id, fofoId, offerId, criteriaId, slabAmount, serialNumber, amount, status, description, createTimestamp, rejectTimestamp);
30652 amit.gupta 63
	}
64
 
65
	@Override
66
	public String toString() {
67
		return "OfferPayout{" +
68
				"id=" + id +
69
				", fofoId=" + fofoId +
70
				", offerId=" + offerId +
71
				", criteriaId=" + criteriaId +
72
				", slabAmount=" + slabAmount +
73
				", serialNumber='" + serialNumber + '\'' +
74
				", amount=" + amount +
75
				", status=" + status +
76
				", description='" + description + '\'' +
77
				", createTimestamp=" + createTimestamp +
30996 amit.gupta 78
				", rejectTimestamp=" + rejectTimestamp +
30652 amit.gupta 79
				'}';
80
	}
81
 
30996 amit.gupta 82
	public LocalDateTime getCreateTimestamp() {
83
		return createTimestamp;
30652 amit.gupta 84
	}
85
 
30996 amit.gupta 86
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
87
		this.createTimestamp = createTimestamp;
88
	}
89
 
90
	public LocalDateTime getRejectTimestamp() {
91
		return rejectTimestamp;
92
	}
93
 
94
	public void setRejectTimestamp(LocalDateTime rejectTimestamp) {
95
		this.rejectTimestamp = rejectTimestamp;
96
	}
97
 
30652 amit.gupta 98
	public long getId() {
99
		return id;
100
	}
101
 
102
	public void setId(long id) {
103
		this.id = id;
104
	}
105
 
106
	public long getFofoId() {
107
		return fofoId;
108
	}
109
 
110
	public void setFofoId(long fofoId) {
111
		this.fofoId = fofoId;
112
	}
113
 
114
	public long getOfferId() {
115
		return offerId;
116
	}
117
 
118
	public void setOfferId(long offerId) {
119
		this.offerId = offerId;
120
	}
121
 
122
	public long getCriteriaId() {
123
		return criteriaId;
124
	}
125
 
126
	public void setCriteriaId(long criteriaId) {
127
		this.criteriaId = criteriaId;
128
	}
129
 
130
	public double getSlabAmount() {
131
		return slabAmount;
132
	}
133
 
134
	public void setSlabAmount(double slabAmount) {
135
		this.slabAmount = slabAmount;
136
	}
137
 
138
	public String getSerialNumber() {
139
		return serialNumber;
140
	}
141
 
142
	public void setSerialNumber(String serialNumber) {
143
		this.serialNumber = serialNumber;
144
	}
145
 
146
	public double getAmount() {
147
		return amount;
148
	}
149
 
150
	public void setAmount(double amount) {
151
		this.amount = amount;
152
	}
153
 
154
	public SchemePayoutStatus getStatus() {
155
		return status;
156
	}
157
 
158
	public void setStatus(SchemePayoutStatus status) {
159
		this.status = status;
160
	}
161
 
162
	public String getDescription() {
163
		return description;
164
	}
165
 
166
	public void setDescription(String description) {
167
		this.description = description;
168
	}
169
}