Subversion Repositories SmartDukaan

Rev

Rev 32438 | Rev 32450 | 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;
32445 amit.gupta 17
	private Milestone previouseBilledMilestone;
32438 amit.gupta 18
	private String state;
19
	private String rbms;
31285 tejbeer 20
 
21
	public PartnerMonthlySaleModel(int fofoId, String yearMonth, long amount) {
22
		super();
23
		this.fofoId = fofoId;
24
		this.yearMonth = yearMonth;
25
		this.amount = amount;
26
	}
27
 
32417 amit.gupta 28
    public YearMonth getYearMonthObj() {
29
        return YearMonth.parse(this.yearMonth, yearMonthFormatter);
30
    }
31
 
32438 amit.gupta 32
	public void setYearMonthObj(YearMonth yearMonth) {
33
		this.yearMonth = yearMonthFormatter.format(yearMonth);
34
	}
35
 
31285 tejbeer 36
	public int getFofoId() {
37
		return fofoId;
38
	}
39
 
40
	public void setFofoId(int fofoId) {
41
		this.fofoId = fofoId;
42
	}
43
 
44
	public String getYearMonth() {
45
		return yearMonth;
46
	}
47
 
48
	public void setYearMonth(String yearMonth) {
49
		this.yearMonth = yearMonth;
50
	}
51
 
52
	public long getAmount() {
53
		return amount;
54
	}
55
 
56
	public void setAmount(long amount) {
57
		this.amount = amount;
58
	}
59
 
32438 amit.gupta 60
	public long getPendingAmount() {
61
		return pendingAmount;
62
	}
63
 
64
	public void setPendingAmount(long pendingAmount) {
65
		this.pendingAmount = pendingAmount;
66
	}
67
 
68
	public String getRbms() {
69
		return rbms;
70
	}
71
 
72
	public void setRbms(String rbms) {
73
		this.rbms = rbms;
74
	}
75
 
31285 tejbeer 76
	@Override
32438 amit.gupta 77
	public boolean equals(Object o) {
78
		if (this == o) return true;
79
		if (o == null || getClass() != o.getClass()) return false;
80
		PartnerMonthlySaleModel that = (PartnerMonthlySaleModel) o;
81
		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 82
	}
83
 
84
	@Override
32438 amit.gupta 85
	public int hashCode() {
86
		return Objects.hash(fofoId, yearMonth, amount, pendingAmount, billedMilestone, state, rbms);
31285 tejbeer 87
	}
88
 
32438 amit.gupta 89
	public Milestone getBilledMilestone() {
90
		return billedMilestone;
91
	}
92
 
93
	public void setBilledMilestone(Milestone billedMilestone) {
94
		this.billedMilestone = billedMilestone;
95
	}
96
 
32445 amit.gupta 97
	public Milestone getPreviouseBilledMilestone() {
98
		return previouseBilledMilestone;
99
	}
100
 
101
	public void setPreviouseBilledMilestone(Milestone previouseBilledMilestone) {
102
		this.previouseBilledMilestone = previouseBilledMilestone;
103
	}
104
 
32438 amit.gupta 105
	public String getState() {
106
		return state;
107
	}
108
 
109
	public void setState(String state) {
110
		this.state = state;
111
	}
112
 
31285 tejbeer 113
	@Override
114
	public String toString() {
32438 amit.gupta 115
		return "PartnerMonthlySaleModel{" +
116
				"fofoId=" + fofoId +
117
				", yearMonth='" + yearMonth + '\'' +
118
				", amount=" + amount +
119
				", pendingAmount=" + pendingAmount +
120
				", billedMilestone=" + billedMilestone +
121
				", state='" + state + '\'' +
122
				'}';
31285 tejbeer 123
	}
124
}