Subversion Repositories SmartDukaan

Rev

Rev 36147 | Go to most recent revision | Details | 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
 
31
	public int getId() {
32
		return id;
33
	}
34
 
35
	public void setId(int id) {
36
		this.id = id;
37
	}
38
 
39
	public int getFofoId() {
40
		return fofoId;
41
	}
42
 
43
	public void setFofoId(int fofoId) {
44
		this.fofoId = fofoId;
45
	}
46
 
47
	public String getCreditNoteNumber() {
48
		return creditNoteNumber;
49
	}
50
 
51
	public void setCreditNoteNumber(String creditNoteNumber) {
52
		this.creditNoteNumber = creditNoteNumber;
53
	}
54
 
55
	public CreditNoteType getType() {
56
		return type;
57
	}
58
 
59
	public void setType(CreditNoteType type) {
60
		this.type = type;
61
	}
62
 
63
	public LocalDateTime getCreateTimestamp() {
64
		return createTimestamp;
65
	}
66
 
67
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
68
		this.createTimestamp = createTimestamp;
69
	}
70
 
71
	@Override
72
	public String toString() {
73
		return "CreditNote{" +
74
				"id=" + id +
75
				", fofoId=" + fofoId +
76
				", creditNoteNumber='" + creditNoteNumber + '\'' +
77
				", cnDate='" + cnDate + '\'' +
78
				", type=" + type +
79
				", createTimestamp=" + createTimestamp +
80
				'}';
81
	}
82
 
83
	public LocalDateTime getCnDate() {
84
		return cnDate;
85
	}
86
 
87
	public void setCnDate(LocalDateTime cnDate) {
88
		this.cnDate = cnDate;
89
	}
90
 
91
	@Override
92
	public boolean equals(Object o) {
93
		if (this == o) return true;
94
		if (o == null || getClass() != o.getClass()) return false;
95
		CreditNote that = (CreditNote) o;
96
		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);
97
	}
98
 
99
	@Override
100
	public int hashCode() {
101
		return Objects.hash(id, fofoId, creditNoteNumber, cnDate, type, createTimestamp);
102
	}
103
 
104
}