Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
23638 amit.gupta 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
23654 amit.gupta 3
import java.time.LocalDateTime;
4
 
23638 amit.gupta 5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.EnumType;
8
import javax.persistence.Enumerated;
9
import javax.persistence.GeneratedValue;
10
import javax.persistence.GenerationType;
11
import javax.persistence.Id;
12
import javax.persistence.Table;
13
 
14
import com.spice.profitmandi.dao.enumuration.fofo.ReturnType;
15
 
16
/**
17
 * @author amit
18
 *
19
 */
20
@Entity
31860 tejbeer 21
@Table(name="fofo.customer_return_item")
23638 amit.gupta 22
public class CustomerReturnItem {
23
 
24
	@Id
25
	@Column(name="id", unique=true, updatable=false)
26
	@GeneratedValue(strategy = GenerationType.IDENTITY)
27
	private int id;
28
 
29
	@Column(name = "fofo_id")
30
	private int fofoId;
31
 
23654 amit.gupta 32
	@Column(name="fofo_order_item_id")
23638 amit.gupta 33
	private int fofoOrderItemId;
34
 
24264 amit.gupta 35
	@Column(name="fofo_order_id")
36
	private int fofoOrderId;
37
 
23638 amit.gupta 38
	@Column(name = "inventory_item_id")
39
	private int inventoryItemId;
40
 
24264 amit.gupta 41
	@Override
42
	public int hashCode() {
43
		final int prime = 31;
44
		int result = 1;
45
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
46
		result = prime * result + creditNoteId;
47
		result = prime * result + fofoId;
48
		result = prime * result + fofoOrderId;
49
		result = prime * result + fofoOrderItemId;
50
		result = prime * result + id;
51
		result = prime * result + inventoryItemId;
52
		result = prime * result + quantity;
53
		result = prime * result + ((remarks == null) ? 0 : remarks.hashCode());
54
		result = prime * result + ((type == null) ? 0 : type.hashCode());
55
		return result;
56
	}
57
 
58
	@Override
59
	public boolean equals(Object obj) {
60
		if (this == obj)
61
			return true;
62
		if (obj == null)
63
			return false;
64
		if (getClass() != obj.getClass())
65
			return false;
66
		CustomerReturnItem other = (CustomerReturnItem) obj;
67
		if (createTimestamp == null) {
68
			if (other.createTimestamp != null)
69
				return false;
70
		} else if (!createTimestamp.equals(other.createTimestamp))
71
			return false;
72
		if (creditNoteId != other.creditNoteId)
73
			return false;
74
		if (fofoId != other.fofoId)
75
			return false;
76
		if (fofoOrderId != other.fofoOrderId)
77
			return false;
78
		if (fofoOrderItemId != other.fofoOrderItemId)
79
			return false;
80
		if (id != other.id)
81
			return false;
82
		if (inventoryItemId != other.inventoryItemId)
83
			return false;
84
		if (quantity != other.quantity)
85
			return false;
86
		if (remarks == null) {
87
			if (other.remarks != null)
88
				return false;
89
		} else if (!remarks.equals(other.remarks))
90
			return false;
91
		if (type != other.type)
92
			return false;
93
		return true;
94
	}
95
 
96
	public int getFofoOrderId() {
97
		return fofoOrderId;
98
	}
99
 
100
	public void setFofoOrderId(int fofoOrderId) {
101
		this.fofoOrderId = fofoOrderId;
102
	}
103
 
23638 amit.gupta 104
	@Column(name = "quantity")
105
	private int quantity;
106
 
23654 amit.gupta 107
	@Column(name = "remarks")
108
	private String remarks;
109
 
110
	public String getRemarks() {
111
		return remarks;
112
	}
113
 
114
	public void setRemarks(String remarks) {
115
		this.remarks = remarks;
116
	}
117
 
118
	public LocalDateTime getCreateTimestamp() {
119
		return createTimestamp;
120
	}
121
 
122
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
123
		this.createTimestamp = createTimestamp;
124
	}
125
 
23638 amit.gupta 126
	@Column(name = "type")
127
	@Enumerated(EnumType.STRING)
128
	private ReturnType type;
129
 
130
	@Column(name="credit_note_id")
131
	private int creditNoteId;
132
 
23654 amit.gupta 133
	@Column(name="create_timestamp")
134
	private LocalDateTime createTimestamp = LocalDateTime.now();
135
 
23638 amit.gupta 136
	public int getId() {
137
		return id;
138
	}
139
 
140
	public void setId(int id) {
141
		this.id = id;
142
	}
143
 
144
	public int getFofoId() {
145
		return fofoId;
146
	}
147
 
148
	public void setFofoId(int fofoId) {
149
		this.fofoId = fofoId;
150
	}
151
 
152
	public int getInventoryItemId() {
153
		return inventoryItemId;
154
	}
155
	public void setInventoryItemId(int inventoryItemId) {
156
		this.inventoryItemId = inventoryItemId;
157
	}
158
 
159
	public int getQuantity() {
160
		return quantity;
161
	}
162
	public void setQuantity(int quantity) {
163
		this.quantity = quantity;
164
	}
165
 
166
	public ReturnType getType() {
167
		return type;
168
	}
169
 
170
	public void setType(ReturnType type) {
171
		this.type = type;
172
	}
173
 
174
	public int getFofoOrderItemId() {
175
		return fofoOrderItemId;
176
	}
177
 
178
	public void setFofoOrderItemId(int fofoOrderItemId) {
179
		this.fofoOrderItemId = fofoOrderItemId;
180
	}
181
 
182
	public int getCreditNoteId() {
183
		return creditNoteId;
184
	}
185
 
186
	public void setCreditNoteId(int creditNoteId) {
187
		this.creditNoteId = creditNoteId;
188
	}
189
 
190
	@Override
191
	public String toString() {
23654 amit.gupta 192
		return "CustomerReturnItem [id=" + id + ", fofoId=" + fofoId + ", fofoOrderItemId=" + fofoOrderItemId
24264 amit.gupta 193
				+ ", fofoOrderId=" + fofoOrderId + ", inventoryItemId=" + inventoryItemId + ", quantity=" + quantity
194
				+ ", remarks=" + remarks + ", type=" + type + ", creditNoteId=" + creditNoteId + ", createTimestamp="
195
				+ createTimestamp + "]";
23638 amit.gupta 196
	}
197
 
198
}