Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
37790 amit 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
3
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
4
 
5
import javax.persistence.*;
6
import java.time.LocalDateTime;
7
 
8
/**
9
 * One failed approval attempt on a return whose credit note NIC refused because the buyer's GSTIN
10
 * is cancelled or invalid. Written in its own transaction so it outlives the rollback of the
11
 * approval it records; the latest row for a return decides whether Finance may refund it as B2C
12
 * today.
13
 */
14
@Entity
15
@Table(name = "fofo.return_irn_failure")
16
public class ReturnIrnFailure {
17
 
18
	public static final String FLOW_INVOICE_RETURN = "INVOICE_RETURN";
19
	public static final String FLOW_DEBIT_NOTE_RETURN = "DEBIT_NOTE_RETURN";
20
 
21
	/** NIC refused the original invoice itself, so no credit note could reference it. */
22
	public static final String STAGE_INVOICE_IRN = "INVOICE_IRN";
23
	/** The invoice had an IRN; NIC refused the credit note raised against it. */
24
	public static final String STAGE_CREDIT_NOTE_IRN = "CREDIT_NOTE_IRN";
25
 
26
	@Id
27
	@Column(name = "id")
28
	@GeneratedValue(strategy = GenerationType.IDENTITY)
29
	private int id;
30
 
31
	@Column(name = "purchase_return_order_id")
32
	private int purchaseReturnOrderId;
33
 
34
	@Column(name = "invoice_number")
35
	private String invoiceNumber;
36
 
37
	@Column(name = "flow")
38
	private String flow;
39
 
40
	@Column(name = "stage")
41
	private String stage;
42
 
43
	@Column(name = "reason")
44
	private String reason;
45
 
46
	@Column(name = "attempted_by")
47
	private String attemptedBy;
48
 
49
	@Convert(converter = LocalDateTimeAttributeConverter.class)
50
	@Column(name = "attempted_at")
51
	private LocalDateTime attemptedAt;
52
 
53
	public int getId() {
54
		return id;
55
	}
56
 
57
	public void setId(int id) {
58
		this.id = id;
59
	}
60
 
61
	public int getPurchaseReturnOrderId() {
62
		return purchaseReturnOrderId;
63
	}
64
 
65
	public void setPurchaseReturnOrderId(int purchaseReturnOrderId) {
66
		this.purchaseReturnOrderId = purchaseReturnOrderId;
67
	}
68
 
69
	public String getInvoiceNumber() {
70
		return invoiceNumber;
71
	}
72
 
73
	public void setInvoiceNumber(String invoiceNumber) {
74
		this.invoiceNumber = invoiceNumber;
75
	}
76
 
77
	public String getFlow() {
78
		return flow;
79
	}
80
 
81
	public void setFlow(String flow) {
82
		this.flow = flow;
83
	}
84
 
85
	public String getStage() {
86
		return stage;
87
	}
88
 
89
	public void setStage(String stage) {
90
		this.stage = stage;
91
	}
92
 
93
	public String getReason() {
94
		return reason;
95
	}
96
 
97
	public void setReason(String reason) {
98
		this.reason = reason;
99
	}
100
 
101
	public String getAttemptedBy() {
102
		return attemptedBy;
103
	}
104
 
105
	public void setAttemptedBy(String attemptedBy) {
106
		this.attemptedBy = attemptedBy;
107
	}
108
 
109
	public LocalDateTime getAttemptedAt() {
110
		return attemptedAt;
111
	}
112
 
113
	public void setAttemptedAt(LocalDateTime attemptedAt) {
114
		this.attemptedAt = attemptedAt;
115
	}
116
}