| 36958 |
amit |
1 |
package com.spice.profitmandi.dao.entity.transaction;
|
|
|
2 |
|
|
|
3 |
import javax.persistence.*;
|
|
|
4 |
import java.math.BigDecimal;
|
|
|
5 |
import java.time.LocalDateTime;
|
|
|
6 |
|
|
|
7 |
/**
|
|
|
8 |
* One physical device (IMEI) covered by a flagship credit limit ({@link Loan} with is_flagship=1).
|
|
|
9 |
* A mixed flagship invoice creates one combined flagship limit row plus one LoanImei per device.
|
|
|
10 |
* On sale/activation the sold IMEI's row is converted to a real loan for exactly that unit's amount.
|
|
|
11 |
*/
|
|
|
12 |
@Entity
|
|
|
13 |
@Table(name = "transaction.loan_imei")
|
|
|
14 |
public class LoanImei {
|
|
|
15 |
|
|
|
16 |
@Id
|
|
|
17 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
18 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
19 |
private int id;
|
|
|
20 |
|
|
|
21 |
@Column(name = "loan_id")
|
|
|
22 |
private int loanId;
|
|
|
23 |
|
|
|
24 |
@Column(name = "imei")
|
|
|
25 |
private String imei;
|
|
|
26 |
|
|
|
27 |
@Column(name = "amount")
|
|
|
28 |
private BigDecimal amount;
|
|
|
29 |
|
|
|
30 |
@Column(name = "converted_on")
|
|
|
31 |
private LocalDateTime convertedOn;
|
|
|
32 |
|
|
|
33 |
@Column(name = "converted_loan_id")
|
|
|
34 |
private Integer convertedLoanId;
|
|
|
35 |
|
|
|
36 |
@Column(name = "created_on")
|
|
|
37 |
private LocalDateTime createdOn;
|
|
|
38 |
|
|
|
39 |
public int getId() {
|
|
|
40 |
return id;
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
public void setId(int id) {
|
|
|
44 |
this.id = id;
|
|
|
45 |
}
|
|
|
46 |
|
|
|
47 |
public int getLoanId() {
|
|
|
48 |
return loanId;
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
public void setLoanId(int loanId) {
|
|
|
52 |
this.loanId = loanId;
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
public String getImei() {
|
|
|
56 |
return imei;
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
public void setImei(String imei) {
|
|
|
60 |
this.imei = imei;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
public BigDecimal getAmount() {
|
|
|
64 |
return amount;
|
|
|
65 |
}
|
|
|
66 |
|
|
|
67 |
public void setAmount(BigDecimal amount) {
|
|
|
68 |
this.amount = amount;
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
public LocalDateTime getConvertedOn() {
|
|
|
72 |
return convertedOn;
|
|
|
73 |
}
|
|
|
74 |
|
|
|
75 |
public void setConvertedOn(LocalDateTime convertedOn) {
|
|
|
76 |
this.convertedOn = convertedOn;
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
public Integer getConvertedLoanId() {
|
|
|
80 |
return convertedLoanId;
|
|
|
81 |
}
|
|
|
82 |
|
|
|
83 |
public void setConvertedLoanId(Integer convertedLoanId) {
|
|
|
84 |
this.convertedLoanId = convertedLoanId;
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
public LocalDateTime getCreatedOn() {
|
|
|
88 |
return createdOn;
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
public void setCreatedOn(LocalDateTime createdOn) {
|
|
|
92 |
this.createdOn = createdOn;
|
|
|
93 |
}
|
|
|
94 |
}
|