Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
22859 ashik.ali 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
36397 amit 3
import javax.persistence.*;
30121 amit.gupta 4
import java.io.Serializable;
5
import java.time.LocalDateTime;
6
import java.util.Objects;
22859 ashik.ali 7
 
8
@Entity
36397 amit 9
@Table(name = "fofo.scheme_item",
10
		uniqueConstraints = @UniqueConstraint(columnNames = {"catalog_id", "scheme_id", "start_date", "end_date"}))
30121 amit.gupta 11
public class SchemeItem implements Serializable {
22859 ashik.ali 12
 
13
	private static final long serialVersionUID = 1L;
14
 
15
	@Id
36397 amit 16
	@Column(name = "id")
17
	@GeneratedValue(strategy = GenerationType.IDENTITY)
18
	private long id;
19
 
22859 ashik.ali 20
	@Column(name = "scheme_id")
21
	private int schemeId;
30121 amit.gupta 22
 
23
	@Column(name = "catalog_id")
24
	private int catalogId;
25
 
34317 amit.gupta 26
	@Column(name = "start_date")
27
	private LocalDateTime startDate;
28
 
29
	@Column(name = "end_date")
30
	private LocalDateTime endDate;
31
 
29606 amit.gupta 32
	@Column(name = "create_timestamp")
29624 amit.gupta 33
	private LocalDateTime createTimestamp = LocalDateTime.now();
30121 amit.gupta 34
 
36397 amit 35
	@Column(name = "updated_by")
36
	private Integer updatedBy;
37
 
38
	@Column(name = "updated_on")
39
	private LocalDateTime updatedOn;
40
 
41
	public long getId() {
42
		return id;
43
	}
44
 
45
	public void setId(long id) {
46
		this.id = id;
47
	}
48
 
22859 ashik.ali 49
	public int getSchemeId() {
50
		return schemeId;
51
	}
30121 amit.gupta 52
 
22859 ashik.ali 53
	public void setSchemeId(int schemeId) {
54
		this.schemeId = schemeId;
55
	}
30121 amit.gupta 56
 
34317 amit.gupta 57
	public LocalDateTime getCreateTimestamp() {
58
		return createTimestamp;
22859 ashik.ali 59
	}
30121 amit.gupta 60
 
34317 amit.gupta 61
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
62
		this.createTimestamp = createTimestamp;
63
	}
64
 
65
	public int getCatalogId() {
66
		return catalogId;
67
	}
68
 
69
	public void setCatalogId(int catalogId) {
70
		this.catalogId = catalogId;
71
	}
72
 
36397 amit 73
	public Integer getUpdatedBy() {
74
		return updatedBy;
75
	}
76
 
77
	public void setUpdatedBy(Integer updatedBy) {
78
		this.updatedBy = updatedBy;
79
	}
80
 
81
	public LocalDateTime getUpdatedOn() {
82
		return updatedOn;
83
	}
84
 
85
	public void setUpdatedOn(LocalDateTime updatedOn) {
86
		this.updatedOn = updatedOn;
87
	}
88
 
30121 amit.gupta 89
	@Override
90
	public String toString() {
91
		return "SchemeItem{" +
36397 amit 92
				"id=" + id +
93
				", schemeId=" + schemeId +
30121 amit.gupta 94
				", catalogId=" + catalogId +
34317 amit.gupta 95
				", startDate=" + startDate +
96
				", endDate=" + endDate +
30121 amit.gupta 97
				", createTimestamp=" + createTimestamp +
36397 amit 98
				", updatedBy=" + updatedBy +
99
				", updatedOn=" + updatedOn +
30121 amit.gupta 100
				'}';
22859 ashik.ali 101
	}
102
 
30121 amit.gupta 103
	@Override
34317 amit.gupta 104
	public boolean equals(Object o) {
105
		if (this == o) return true;
106
		if (o == null || getClass() != o.getClass()) return false;
107
		SchemeItem that = (SchemeItem) o;
36397 amit 108
		return schemeId == that.schemeId && catalogId == that.catalogId && Objects.equals(startDate, that.startDate) && Objects.equals(endDate, that.endDate);
34317 amit.gupta 109
	}
110
 
111
	@Override
30121 amit.gupta 112
	public int hashCode() {
36397 amit 113
		return Objects.hash(schemeId, catalogId, startDate, endDate);
30121 amit.gupta 114
	}
115
 
34317 amit.gupta 116
	public LocalDateTime getStartDate() {
117
		return startDate;
29606 amit.gupta 118
	}
119
 
34317 amit.gupta 120
	public void setStartDate(LocalDateTime startDate) {
121
		this.startDate = startDate;
29606 amit.gupta 122
	}
123
 
34317 amit.gupta 124
	public LocalDateTime getEndDate() {
125
		return endDate;
22859 ashik.ali 126
	}
127
 
34317 amit.gupta 128
	public void setEndDate(LocalDateTime endDate) {
129
		this.endDate = endDate;
22859 ashik.ali 130
	}
131
}