Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
23504 ashik.ali 1
package com.spice.profitmandi.dao.entity.dtr;
2
 
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
5
 
6
import javax.persistence.Column;
7
import javax.persistence.Convert;
8
import javax.persistence.Entity;
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.convertor.LocalDateTimeAttributeConverter;
15
 
16
/**
17
 * 
18
 * @author ashikali
19
 *
20
 */
21
@Entity
31860 tejbeer 22
@Table(name="dtr.recharge_provider")
23504 ashik.ali 23
public class RechargeProvider implements Serializable{
24
 
25
	private static final long serialVersionUID = 1L;
26
 
27
	public RechargeProvider() {
28
	}
29
 
30
	@Id
31
	@Column(name="id", unique=true, updatable=false)
32
	@GeneratedValue(strategy = GenerationType.IDENTITY)
33
	private int id;
34
 
35
	@Column(name="name", unique = true)
36
	private String name;
37
 
23627 ashik.ali 38
	@Column(name = "amount")
39
	private float amount;
40
 
23504 ashik.ali 41
	@Convert(converter = LocalDateTimeAttributeConverter.class)
42
	@Column(name="active_timestamp")
43
	private LocalDateTime activeTimestamp = null;
44
 
45
	@Convert(converter = LocalDateTimeAttributeConverter.class)
46
	@Column(name="inactive_timestamp")
47
	private LocalDateTime inactiveTimestamp = null;
48
 
49
	@Convert(converter = LocalDateTimeAttributeConverter.class)
50
	@Column(name="create_timestamp", updatable = false)
51
	private LocalDateTime createTimestamp = LocalDateTime.now();
52
 
53
	public int getId() {
54
		return id;
55
	}
56
	public void setId(int id) {
57
		this.id = id;
58
	}
59
	public void setName(String name) {
60
        this.name = name;
61
    }
62
    public String getName() {
63
        return name;
64
    }
65
 
23627 ashik.ali 66
    public float getAmount() {
67
		return amount;
68
	}
69
 
70
    public void setAmount(float amount) {
71
		this.amount = amount;
72
	}
73
 
23504 ashik.ali 74
    public LocalDateTime getActiveTimestamp() {
75
		return activeTimestamp;
76
	}
77
 
78
    public void setActiveTimestamp(LocalDateTime activeTimestamp) {
79
		this.activeTimestamp = activeTimestamp;
80
	}
81
 
82
    public LocalDateTime getInactiveTimestamp() {
83
		return inactiveTimestamp;
84
	}
85
 
86
    public void setInactiveTimestamp(LocalDateTime inactiveTimestamp) {
87
		this.inactiveTimestamp = inactiveTimestamp;
88
	}
89
 
90
    public void setCreateTimestamp(LocalDateTime createTimestamp) {
91
		this.createTimestamp = createTimestamp;
92
	}
93
    public LocalDateTime getCreateTimestamp() {
94
		return createTimestamp;
95
	}
96
 
97
	@Override
98
	public int hashCode() {
99
		final int prime = 31;
100
		int result = 1;
101
		result = prime * result + id;
102
		return result;
103
	}
104
 
105
	@Override
106
	public boolean equals(Object obj) {
107
		if (this == obj)
108
			return true;
109
		if (obj == null)
110
			return false;
111
		if (getClass() != obj.getClass())
112
			return false;
113
		RechargeProvider other = (RechargeProvider) obj;
114
		if (id != other.id)
115
			return false;
116
		return true;
117
	}
118
	@Override
119
	public String toString() {
23627 ashik.ali 120
		return "RechargeProvider [id=" + id + ", name=" + name + ", amount=" + amount + ", activeTimestamp="
121
				+ activeTimestamp + ", inactiveTimestamp=" + inactiveTimestamp + ", createTimestamp=" + createTimestamp
122
				+ "]";
23504 ashik.ali 123
	}
23627 ashik.ali 124
 
23504 ashik.ali 125
}