Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
31285 tejbeer 1
package com.spice.profitmandi.dao.model;
2
 
32438 amit.gupta 3
import com.spice.profitmandi.dao.enumuration.fofo.Milestone;
4
 
32417 amit.gupta 5
import java.time.YearMonth;
6
import java.time.format.DateTimeFormatter;
31285 tejbeer 7
import java.util.Objects;
8
 
9
public class PartnerMonthlySaleModel {
10
 
11
	private int fofoId;
12
	private String yearMonth;
13
	private long amount;
32438 amit.gupta 14
	private static final DateTimeFormatter yearMonthFormatter = DateTimeFormatter.ofPattern("MM-yyyy");
15
	private long pendingAmount;
16
	private Milestone billedMilestone;
17
	private String state;
18
	private String rbms;
31285 tejbeer 19
 
20
	public PartnerMonthlySaleModel(int fofoId, String yearMonth, long amount) {
21
		super();
22
		this.fofoId = fofoId;
23
		this.yearMonth = yearMonth;
24
		this.amount = amount;
25
	}
26
 
32417 amit.gupta 27
    public YearMonth getYearMonthObj() {
28
        return YearMonth.parse(this.yearMonth, yearMonthFormatter);
29
    }
30
 
32438 amit.gupta 31
	public void setYearMonthObj(YearMonth yearMonth) {
32
		this.yearMonth = yearMonthFormatter.format(yearMonth);
33
	}
34
 
31285 tejbeer 35
	public int getFofoId() {
36
		return fofoId;
37
	}
38
 
39
	public void setFofoId(int fofoId) {
40
		this.fofoId = fofoId;
41
	}
42
 
43
	public String getYearMonth() {
44
		return yearMonth;
45
	}
46
 
47
	public void setYearMonth(String yearMonth) {
48
		this.yearMonth = yearMonth;
49
	}
50
 
51
	public long getAmount() {
52
		return amount;
53
	}
54
 
55
	public void setAmount(long amount) {
56
		this.amount = amount;
57
	}
58
 
32438 amit.gupta 59
	public long getPendingAmount() {
60
		return pendingAmount;
61
	}
62
 
63
	public void setPendingAmount(long pendingAmount) {
64
		this.pendingAmount = pendingAmount;
65
	}
66
 
67
	public String getRbms() {
68
		return rbms;
69
	}
70
 
71
	public void setRbms(String rbms) {
72
		this.rbms = rbms;
73
	}
74
 
31285 tejbeer 75
	@Override
32438 amit.gupta 76
	public boolean equals(Object o) {
77
		if (this == o) return true;
78
		if (o == null || getClass() != o.getClass()) return false;
79
		PartnerMonthlySaleModel that = (PartnerMonthlySaleModel) o;
80
		return fofoId == that.fofoId && amount == that.amount && pendingAmount == that.pendingAmount && Objects.equals(yearMonth, that.yearMonth) && billedMilestone == that.billedMilestone && Objects.equals(state, that.state) && Objects.equals(rbms, that.rbms);
31285 tejbeer 81
	}
82
 
83
	@Override
32438 amit.gupta 84
	public int hashCode() {
85
		return Objects.hash(fofoId, yearMonth, amount, pendingAmount, billedMilestone, state, rbms);
31285 tejbeer 86
	}
87
 
32438 amit.gupta 88
	public Milestone getBilledMilestone() {
89
		return billedMilestone;
90
	}
91
 
92
	public void setBilledMilestone(Milestone billedMilestone) {
93
		this.billedMilestone = billedMilestone;
94
	}
95
 
96
	public String getState() {
97
		return state;
98
	}
99
 
100
	public void setState(String state) {
101
		this.state = state;
102
	}
103
 
31285 tejbeer 104
	@Override
105
	public String toString() {
32438 amit.gupta 106
		return "PartnerMonthlySaleModel{" +
107
				"fofoId=" + fofoId +
108
				", yearMonth='" + yearMonth + '\'' +
109
				", amount=" + amount +
110
				", pendingAmount=" + pendingAmount +
111
				", billedMilestone=" + billedMilestone +
112
				", state='" + state + '\'' +
113
				'}';
31285 tejbeer 114
	}
115
}