| 30859 |
tejbeer |
1 |
package com.spice.profitmandi.dao.entity.transaction;
|
|
|
2 |
|
| 32681 |
amit.gupta |
3 |
import com.spice.profitmandi.dao.model.DailyStatementModel;
|
|
|
4 |
|
|
|
5 |
import javax.persistence.*;
|
| 30859 |
tejbeer |
6 |
import java.math.BigDecimal;
|
|
|
7 |
import java.time.LocalDateTime;
|
|
|
8 |
import java.util.List;
|
| 32681 |
amit.gupta |
9 |
import java.util.Objects;
|
| 30859 |
tejbeer |
10 |
|
|
|
11 |
@Entity
|
| 32074 |
tejbeer |
12 |
@Table(name = "transaction.loan")
|
| 30859 |
tejbeer |
13 |
public class Loan {
|
|
|
14 |
|
|
|
15 |
@Id
|
|
|
16 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
17 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
18 |
private int id;
|
|
|
19 |
|
|
|
20 |
@Column(name = "fofo_id")
|
|
|
21 |
private int fofoId;
|
|
|
22 |
|
|
|
23 |
@Column(name = "interest_rate")
|
|
|
24 |
private BigDecimal interestRate;
|
|
|
25 |
|
|
|
26 |
@Column(name = "intial_amount")
|
|
|
27 |
private BigDecimal intialAmount;
|
|
|
28 |
|
|
|
29 |
@Column(name = "pending_amount")
|
|
|
30 |
private BigDecimal pendingAmount;
|
|
|
31 |
|
|
|
32 |
@Column(name = "created_on")
|
|
|
33 |
private LocalDateTime createdOn;
|
|
|
34 |
|
| 32681 |
amit.gupta |
35 |
@Column(name = "settled_on")
|
|
|
36 |
private LocalDateTime settledOn;
|
|
|
37 |
|
| 30859 |
tejbeer |
38 |
@Column(name = "due_date")
|
|
|
39 |
private LocalDateTime dueDate;
|
|
|
40 |
|
|
|
41 |
@Column(name = "interest_accured")
|
|
|
42 |
private BigDecimal interestAccrued;
|
|
|
43 |
|
|
|
44 |
@Column(name = "interest_paid")
|
|
|
45 |
private BigDecimal interestPaid;
|
|
|
46 |
|
|
|
47 |
@Column(name = "free_days")
|
|
|
48 |
private int freeDays;
|
|
|
49 |
|
|
|
50 |
@Transient
|
| 30929 |
tejbeer |
51 |
private boolean loanStatus;
|
|
|
52 |
|
|
|
53 |
@Transient
|
| 31159 |
tejbeer |
54 |
private BigDecimal totalPending;
|
|
|
55 |
|
|
|
56 |
@Transient
|
| 30859 |
tejbeer |
57 |
private List<DailyStatementModel> dailyStatementModel;
|
|
|
58 |
|
|
|
59 |
public int getId() {
|
|
|
60 |
return id;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
public void setId(int id) {
|
|
|
64 |
this.id = id;
|
|
|
65 |
}
|
|
|
66 |
|
| 31159 |
tejbeer |
67 |
public BigDecimal getTotalPending() {
|
|
|
68 |
return totalPending;
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
public void setTotalPending(BigDecimal totalPending) {
|
|
|
72 |
this.totalPending = totalPending;
|
|
|
73 |
}
|
|
|
74 |
|
| 30859 |
tejbeer |
75 |
public int getFofoId() {
|
|
|
76 |
return fofoId;
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
public void setFofoId(int fofoId) {
|
|
|
80 |
this.fofoId = fofoId;
|
|
|
81 |
}
|
|
|
82 |
|
|
|
83 |
public BigDecimal getInterestRate() {
|
|
|
84 |
return interestRate;
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
public void setInterestRate(BigDecimal interestRate) {
|
|
|
88 |
this.interestRate = interestRate;
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
public BigDecimal getIntialAmount() {
|
|
|
92 |
return intialAmount;
|
|
|
93 |
}
|
|
|
94 |
|
|
|
95 |
public void setIntialAmount(BigDecimal intialAmount) {
|
|
|
96 |
this.intialAmount = intialAmount;
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
public BigDecimal getPendingAmount() {
|
|
|
100 |
return pendingAmount;
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
public void setPendingAmount(BigDecimal pendingAmount) {
|
|
|
104 |
this.pendingAmount = pendingAmount;
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
public LocalDateTime getCreatedOn() {
|
|
|
108 |
return createdOn;
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
public void setCreatedOn(LocalDateTime createdOn) {
|
|
|
112 |
this.createdOn = createdOn;
|
|
|
113 |
}
|
|
|
114 |
|
|
|
115 |
public LocalDateTime getDueDate() {
|
|
|
116 |
return dueDate;
|
|
|
117 |
}
|
|
|
118 |
|
|
|
119 |
public void setDueDate(LocalDateTime dueDate) {
|
|
|
120 |
this.dueDate = dueDate;
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
public BigDecimal getInterestAccrued() {
|
|
|
124 |
return interestAccrued;
|
|
|
125 |
}
|
|
|
126 |
|
|
|
127 |
public void setInterestAccrued(BigDecimal interestAccrued) {
|
|
|
128 |
this.interestAccrued = interestAccrued;
|
|
|
129 |
}
|
|
|
130 |
|
|
|
131 |
public BigDecimal getInterestPaid() {
|
|
|
132 |
return interestPaid;
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
public void setInterestPaid(BigDecimal interestPaid) {
|
|
|
136 |
this.interestPaid = interestPaid;
|
|
|
137 |
}
|
|
|
138 |
|
|
|
139 |
public int getFreeDays() {
|
|
|
140 |
return freeDays;
|
|
|
141 |
}
|
|
|
142 |
|
|
|
143 |
public void setFreeDays(int freeDays) {
|
|
|
144 |
this.freeDays = freeDays;
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
public List<DailyStatementModel> getDailyStatementModel() {
|
|
|
148 |
return dailyStatementModel;
|
|
|
149 |
}
|
|
|
150 |
|
|
|
151 |
public void setDailyStatementModel(List<DailyStatementModel> dailyStatementModel) {
|
|
|
152 |
this.dailyStatementModel = dailyStatementModel;
|
|
|
153 |
}
|
|
|
154 |
|
| 32681 |
amit.gupta |
155 |
@Override
|
|
|
156 |
public String toString() {
|
|
|
157 |
return "Loan{" +
|
|
|
158 |
"id=" + id +
|
|
|
159 |
", fofoId=" + fofoId +
|
|
|
160 |
", interestRate=" + interestRate +
|
|
|
161 |
", intialAmount=" + intialAmount +
|
|
|
162 |
", pendingAmount=" + pendingAmount +
|
|
|
163 |
", createdOn=" + createdOn +
|
|
|
164 |
", settledOn=" + settledOn +
|
|
|
165 |
", dueDate=" + dueDate +
|
|
|
166 |
", interestAccrued=" + interestAccrued +
|
|
|
167 |
", interestPaid=" + interestPaid +
|
|
|
168 |
", freeDays=" + freeDays +
|
|
|
169 |
", loanStatus=" + loanStatus +
|
|
|
170 |
", totalPending=" + totalPending +
|
|
|
171 |
", dailyStatementModel=" + dailyStatementModel +
|
|
|
172 |
'}';
|
|
|
173 |
}
|
|
|
174 |
|
|
|
175 |
@Override
|
|
|
176 |
public boolean equals(Object o) {
|
|
|
177 |
if (this == o) return true;
|
|
|
178 |
if (o == null || getClass() != o.getClass()) return false;
|
|
|
179 |
Loan loan = (Loan) o;
|
|
|
180 |
return id == loan.id && fofoId == loan.fofoId && freeDays == loan.freeDays && loanStatus == loan.loanStatus && Objects.equals(interestRate, loan.interestRate) && Objects.equals(intialAmount, loan.intialAmount) && Objects.equals(pendingAmount, loan.pendingAmount) && Objects.equals(createdOn, loan.createdOn) && Objects.equals(settledOn, loan.settledOn) && Objects.equals(dueDate, loan.dueDate) && Objects.equals(interestAccrued, loan.interestAccrued) && Objects.equals(interestPaid, loan.interestPaid) && Objects.equals(totalPending, loan.totalPending) && Objects.equals(dailyStatementModel, loan.dailyStatementModel);
|
|
|
181 |
}
|
|
|
182 |
|
|
|
183 |
@Override
|
|
|
184 |
public int hashCode() {
|
|
|
185 |
return Objects.hash(id, fofoId, interestRate, intialAmount, pendingAmount, createdOn, settledOn, dueDate, interestAccrued, interestPaid, freeDays, loanStatus, totalPending, dailyStatementModel);
|
|
|
186 |
}
|
|
|
187 |
|
|
|
188 |
public LocalDateTime getSettledOn() {
|
|
|
189 |
return settledOn;
|
|
|
190 |
}
|
|
|
191 |
|
|
|
192 |
public void setSettledOn(LocalDateTime settledOn) {
|
|
|
193 |
this.settledOn = settledOn;
|
|
|
194 |
}
|
|
|
195 |
|
| 30929 |
tejbeer |
196 |
public boolean isLoanStatus() {
|
|
|
197 |
return loanStatus;
|
|
|
198 |
}
|
|
|
199 |
|
|
|
200 |
public void setLoanStatus(boolean loanStatus) {
|
|
|
201 |
this.loanStatus = loanStatus;
|
|
|
202 |
}
|
|
|
203 |
|
| 30859 |
tejbeer |
204 |
}
|