Subversion Repositories SmartDukaan

Rev

Rev 36318 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
36318 aman 1
package com.spice.profitmandi.dao.entity.warehouse;
2
 
3
import javax.persistence.*;
4
import java.io.Serializable;
5
import java.util.Date;
6
 
7
@Entity
8
@Table(name = "warehouse.purchasereturn")
9
public class PurchaseReturn implements Serializable {
10
 
11
    private static final long serialVersionUID = 1L;
36568 amit 12
 
13
    // ── Core ──────────────────────────────────────────────────────────
14
 
36318 aman 15
    @Id
16
    @Column(name = "id", unique = true, updatable = false)
17
    @GeneratedValue(strategy = GenerationType.IDENTITY)
18
    private int id;
36568 amit 19
 
36318 aman 20
    @Column(name = "vendorId")
21
    private Integer vendorId;
36568 amit 22
 
36318 aman 23
    @Column(name = "type")
24
    @Enumerated(EnumType.STRING)
25
    private Type type;
36568 amit 26
 
36318 aman 27
    @Column(name = "returnInventoryType")
28
    @Enumerated(EnumType.STRING)
29
    private InventoryType returnInventoryType;
36568 amit 30
 
31
    @Column(name = "returnTimestamp")
32
    @Temporal(TemporalType.TIMESTAMP)
33
    private Date returnTimestamp;
34
 
35
    @Column(name = "createdBy")
36
    private String createdBy;
37
 
38
    // ── Financial ─────────────────────────────────────────────────────
39
 
40
    @Column(name = "amount")
41
    private Float amount;
42
 
43
    @Column(name = "unsettledAmount")
44
    private Float unsettledAmount;
45
 
46
    @Column(name = "isSettled")
47
    private Boolean isSettled;
48
 
36318 aman 49
    @Column(name = "currentSettlementType")
50
    @Enumerated(EnumType.STRING)
51
    private SettlementTypeEnum currentSettlementType;
36568 amit 52
 
36318 aman 53
    @Column(name = "latestSettlementDate")
54
    @Temporal(TemporalType.TIMESTAMP)
55
    private Date latestSettlementDate;
36568 amit 56
 
57
    @Column(name = "documentNumber")
58
    private String documentNumber;
59
 
60
    // ── Reason ────────────────────────────────────────────────────────
61
 
36318 aman 62
    @Column(name = "purchaseReturnType")
63
    @Enumerated(EnumType.STRING)
64
    private PurchaseReturnTypeEnum purchaseReturnType;
36568 amit 65
 
36318 aman 66
    @Column(name = "reasonText")
67
    private String reasonText;
68
 
36568 amit 69
    // ── Getters / Setters ─────────────────────────────────────────────
70
 
36318 aman 71
    public int getId() {
72
        return id;
73
    }
74
 
75
    public void setId(int id) {
76
        this.id = id;
77
    }
78
 
79
    public Integer getVendorId() {
80
        return vendorId;
81
    }
82
 
83
    public void setVendorId(Integer vendorId) {
84
        this.vendorId = vendorId;
85
    }
86
 
36568 amit 87
    public Type getType() {
88
        return type;
36318 aman 89
    }
90
 
36568 amit 91
    public void setType(Type type) {
92
        this.type = type;
36318 aman 93
    }
94
 
36568 amit 95
    public InventoryType getReturnInventoryType() {
96
        return returnInventoryType;
97
    }
98
 
99
    public void setReturnInventoryType(InventoryType returnInventoryType) {
100
        this.returnInventoryType = returnInventoryType;
101
    }
102
 
36318 aman 103
    public Date getReturnTimestamp() {
104
        return returnTimestamp;
105
    }
106
 
107
    public void setReturnTimestamp(Date returnTimestamp) {
108
        this.returnTimestamp = returnTimestamp;
109
    }
110
 
36568 amit 111
    public String getCreatedBy() {
112
        return createdBy;
36318 aman 113
    }
114
 
36568 amit 115
    public void setCreatedBy(String createdBy) {
116
        this.createdBy = createdBy;
36318 aman 117
    }
118
 
36568 amit 119
    public Float getAmount() {
120
        return amount;
36318 aman 121
    }
122
 
36568 amit 123
    public void setAmount(Float amount) {
124
        this.amount = amount;
36318 aman 125
    }
126
 
36568 amit 127
    public Float getUnsettledAmount() {
128
        return unsettledAmount;
36318 aman 129
    }
130
 
36568 amit 131
    public void setUnsettledAmount(Float unsettledAmount) {
132
        this.unsettledAmount = unsettledAmount;
36318 aman 133
    }
134
 
36568 amit 135
    public Boolean getIsSettled() {
136
        return isSettled;
137
    }
138
 
139
    public void setIsSettled(Boolean isSettled) {
140
        this.isSettled = isSettled;
141
    }
142
 
36318 aman 143
    public SettlementTypeEnum getCurrentSettlementType() {
144
        return currentSettlementType;
145
    }
146
 
147
    public void setCurrentSettlementType(SettlementTypeEnum currentSettlementType) {
148
        this.currentSettlementType = currentSettlementType;
149
    }
150
 
151
    public Date getLatestSettlementDate() {
152
        return latestSettlementDate;
153
    }
154
 
155
    public void setLatestSettlementDate(Date latestSettlementDate) {
156
        this.latestSettlementDate = latestSettlementDate;
157
    }
158
 
36568 amit 159
    public String getDocumentNumber() {
160
        return documentNumber;
161
    }
162
 
163
    public void setDocumentNumber(String documentNumber) {
164
        this.documentNumber = documentNumber;
165
    }
166
 
36318 aman 167
    public PurchaseReturnTypeEnum getPurchaseReturnType() {
168
        return purchaseReturnType;
169
    }
170
 
171
    public void setPurchaseReturnType(PurchaseReturnTypeEnum purchaseReturnType) {
172
        this.purchaseReturnType = purchaseReturnType;
173
    }
174
 
175
    public String getReasonText() {
176
        return reasonText;
177
    }
178
 
179
    public void setReasonText(String reasonText) {
180
        this.reasonText = reasonText;
181
    }
182
 
36568 amit 183
    // ── Enums ─────────────────────────────────────────────────────────
36318 aman 184
 
185
    public enum Type {REAL, VIRTUAL}
186
 
187
    public enum InventoryType {GOOD, BAD}
188
 
189
    public enum SettlementTypeEnum {CREDIT_NOTE, REPLACEMENT, AGAINST_GRN}
190
 
191
    public enum PurchaseReturnTypeEnum {WRONG_GRN, ACTUAL_PR, REPLACEMENT}
192
}