Subversion Repositories SmartDukaan

Rev

Rev 23786 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
23716 amit.gupta 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
5
 
6
import javax.persistence.Column;
7
import javax.persistence.Entity;
8
import javax.persistence.Id;
9
import javax.persistence.Table;
10
 
11
@Entity
12
@Table(name="fofo.stock_allocation")
13
public class StockAllocation implements Serializable{
14
 
15
	private static final long serialVersionUID = 1L;
16
 
17
 
18
	@Id
19
	@Column(name = "fofo_id")
20
	private int fofoId;
21
 
22
	@Id
23
	@Column(name = "item_id")
24
	private int itemId;
25
 
26
	@Column(name = "create_timestamp")
27
	private LocalDateTime createTimestamp = LocalDateTime.now();
28
 
29
	@Override
30
	public int hashCode() {
31
		final int prime = 31;
32
		int result = 1;
33
		result = prime * result + fofoId;
34
		result = prime * result + itemId;
35
		return result;
36
	}
37
 
38
 
39
 
40
	@Override
41
	public boolean equals(Object obj) {
42
		if (this == obj)
43
			return true;
44
		if (obj == null)
45
			return false;
46
		if (getClass() != obj.getClass())
47
			return false;
48
		StockAllocation other = (StockAllocation) obj;
49
		if (fofoId != other.fofoId)
50
			return false;
51
		if (itemId != other.itemId)
52
			return false;
53
		return true;
54
	}
55
 
56
 
57
 
58
	public int getFofoId() {
59
		return fofoId;
60
	}
61
 
62
 
63
 
64
	public void setFofoId(int fofoId) {
65
		this.fofoId = fofoId;
66
	}
67
 
68
 
69
 
70
	@Column(name = "update_timestamp")
71
	private LocalDateTime updateTimestamp = LocalDateTime.now();
72
 
73
	public LocalDateTime getUpdateTimestamp() {
74
		return updateTimestamp;
75
	}
76
 
77
 
78
 
79
	public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
80
		this.updateTimestamp = updateTimestamp;
81
	}
82
 
83
 
84
 
85
	@Column(name = "active")
86
	private boolean active;
87
 
88
	@Column(name = "quantity")
89
	private int quantity;
90
 
91
 
92
 
93
	public int getQuantity() {
94
		return quantity;
95
	}
96
 
97
 
98
 
99
	public void setQuantity(int quantity) {
100
		this.quantity = quantity;
101
	}
102
 
103
 
104
 
105
	public int getItemId() {
106
		return itemId;
107
	}
108
 
109
 
110
 
111
	public void setItemId(int itemId) {
112
		this.itemId = itemId;
113
	}
114
 
115
 
116
 
117
	public LocalDateTime getCreateTimestamp() {
118
		return createTimestamp;
119
	}
120
 
121
 
122
 
123
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
124
		this.createTimestamp = createTimestamp;
125
	}
126
 
127
 
128
 
129
	public boolean isActive() {
130
		return active;
131
	}
132
 
133
 
134
 
135
	public void setActive(boolean active) {
136
		this.active = active;
137
	}
138
 
139
 
140
	@Override
141
	public String toString() {
142
		return "StockAllocation [fofoId=" + fofoId + ", itemId=" + itemId + ", createTimestamp=" + createTimestamp
143
				+ ", updateTimestamp=" + updateTimestamp + ", active=" + active + ", quantity=" + quantity + "]";
144
	}
145
 
146
 
147
}