Subversion Repositories SmartDukaan

Rev

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