Subversion Repositories SmartDukaan

Rev

Rev 31008 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
31008 amit.gupta 1
package com.spice.profitmandi.dao.entity.transaction;
2
 
3
import javax.persistence.*;
4
import java.time.LocalDateTime;
5
import java.util.Objects;
6
 
7
@Entity
8
@Table(name = "transaction.credit_note", schema = "transaction")
9
public class CreditNote {
10
	@Id
11
	@Column(name = "id")
12
	@GeneratedValue(strategy = GenerationType.IDENTITY)
13
	private int id;
14
 
15
	@Column(name = "fofo_id")
16
	private int fofoId;
17
 
18
	@Column(name = "cn_number")
19
	private String creditNoteNumber;
20
 
21
	@Column(name = "cn_date")
22
	private LocalDateTime cnDate;
23
 
24
	@Enumerated(EnumType.STRING)
25
	@Column(name = "cn_type")
26
	private CreditNoteType type;
27
 
28
	@Column(name = "create_timestamp")
29
	private LocalDateTime createTimestamp;
30
 
36147 amit 31
	@Column(name = "original_invoice_number")
32
	private String originalInvoiceNumber;
33
 
31008 amit.gupta 34
	public int getId() {
35
		return id;
36
	}
37
 
38
	public void setId(int id) {
39
		this.id = id;
40
	}
41
 
42
	public int getFofoId() {
43
		return fofoId;
44
	}
45
 
46
	public void setFofoId(int fofoId) {
47
		this.fofoId = fofoId;
48
	}
49
 
50
	public String getCreditNoteNumber() {
51
		return creditNoteNumber;
52
	}
53
 
54
	public void setCreditNoteNumber(String creditNoteNumber) {
55
		this.creditNoteNumber = creditNoteNumber;
56
	}
57
 
58
	public CreditNoteType getType() {
59
		return type;
60
	}
61
 
62
	public void setType(CreditNoteType type) {
63
		this.type = type;
64
	}
65
 
66
	public LocalDateTime getCreateTimestamp() {
67
		return createTimestamp;
68
	}
69
 
70
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
71
		this.createTimestamp = createTimestamp;
72
	}
73
 
74
	@Override
75
	public String toString() {
76
		return "CreditNote{" +
77
				"id=" + id +
78
				", fofoId=" + fofoId +
79
				", creditNoteNumber='" + creditNoteNumber + '\'' +
80
				", cnDate='" + cnDate + '\'' +
81
				", type=" + type +
82
				", createTimestamp=" + createTimestamp +
83
				'}';
84
	}
85
 
86
	public LocalDateTime getCnDate() {
87
		return cnDate;
88
	}
89
 
90
	public void setCnDate(LocalDateTime cnDate) {
91
		this.cnDate = cnDate;
92
	}
93
 
36147 amit 94
	public String getOriginalInvoiceNumber() {
95
		return originalInvoiceNumber;
96
	}
97
 
98
	public void setOriginalInvoiceNumber(String originalInvoiceNumber) {
99
		this.originalInvoiceNumber = originalInvoiceNumber;
100
	}
101
 
31008 amit.gupta 102
	@Override
103
	public boolean equals(Object o) {
104
		if (this == o) return true;
105
		if (o == null || getClass() != o.getClass()) return false;
106
		CreditNote that = (CreditNote) o;
107
		return id == that.id && fofoId == that.fofoId && Objects.equals(creditNoteNumber, that.creditNoteNumber) && Objects.equals(cnDate, that.cnDate) && type == that.type && Objects.equals(createTimestamp, that.createTimestamp);
108
	}
109
 
110
	@Override
111
	public int hashCode() {
112
		return Objects.hash(id, fofoId, creditNoteNumber, cnDate, type, createTimestamp);
113
	}
114
 
115
}