Subversion Repositories SmartDukaan

Rev

Rev 32074 | Rev 33528 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32074 Rev 32681
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.transaction;
1
package com.spice.profitmandi.dao.entity.transaction;
2
 
2
 
-
 
3
import com.spice.profitmandi.dao.model.DailyStatementModel;
-
 
4
 
-
 
5
import javax.persistence.*;
3
import java.math.BigDecimal;
6
import java.math.BigDecimal;
4
import java.time.LocalDateTime;
7
import java.time.LocalDateTime;
5
import java.util.List;
8
import java.util.List;
6
 
-
 
7
import javax.persistence.Column;
-
 
8
import javax.persistence.Entity;
-
 
9
import javax.persistence.GeneratedValue;
-
 
10
import javax.persistence.GenerationType;
-
 
11
import javax.persistence.Id;
9
import java.util.Objects;
12
import javax.persistence.Table;
-
 
13
import javax.persistence.Transient;
-
 
14
 
-
 
15
import com.spice.profitmandi.dao.model.DailyStatementModel;
-
 
16
 
10
 
17
@Entity
11
@Entity
18
@Table(name = "transaction.loan")
12
@Table(name = "transaction.loan")
19
public class Loan {
13
public class Loan {
20
 
14
 
Line 36... Line 30...
36
	private BigDecimal pendingAmount;
30
	private BigDecimal pendingAmount;
37
 
31
 
38
	@Column(name = "created_on")
32
	@Column(name = "created_on")
39
	private LocalDateTime createdOn;
33
	private LocalDateTime createdOn;
40
 
34
 
-
 
35
	@Column(name = "settled_on")
-
 
36
	private LocalDateTime settledOn;
-
 
37
 
41
	@Column(name = "due_date")
38
	@Column(name = "due_date")
42
	private LocalDateTime dueDate;
39
	private LocalDateTime dueDate;
43
 
40
 
44
	@Column(name = "interest_accured")
41
	@Column(name = "interest_accured")
45
	private BigDecimal interestAccrued;
42
	private BigDecimal interestAccrued;
Line 153... Line 150...
153
 
150
 
154
	public void setDailyStatementModel(List<DailyStatementModel> dailyStatementModel) {
151
	public void setDailyStatementModel(List<DailyStatementModel> dailyStatementModel) {
155
		this.dailyStatementModel = dailyStatementModel;
152
		this.dailyStatementModel = dailyStatementModel;
156
	}
153
	}
157
 
154
 
-
 
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
 
158
	public boolean isLoanStatus() {
196
	public boolean isLoanStatus() {
159
		return loanStatus;
197
		return loanStatus;
160
	}
198
	}
161
 
199
 
162
	public void setLoanStatus(boolean loanStatus) {
200
	public void setLoanStatus(boolean loanStatus) {
163
		this.loanStatus = loanStatus;
201
		this.loanStatus = loanStatus;
164
	}
202
	}
165
 
203
 
166
	@Override
-
 
167
	public String toString() {
-
 
168
		return "Loan [id=" + id + ", fofoId=" + fofoId + ", interestRate=" + interestRate + ", intialAmount="
-
 
169
				+ intialAmount + ", pendingAmount=" + pendingAmount + ", createdOn=" + createdOn + ", dueDate="
-
 
170
				+ dueDate + ", interestAccrued=" + interestAccrued + ", interestPaid=" + interestPaid + ", freeDays="
-
 
171
				+ freeDays + ", loanStatus=" + loanStatus + ", totalPending=" + totalPending + ", dailyStatementModel="
-
 
172
				+ dailyStatementModel + "]";
-
 
173
	}
-
 
174
 
-
 
175
}
204
}