Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
25300 tejbeer 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
@SuppressWarnings("serial")
17
@Entity
18
@Table(name = "dtr.pushnotifications", schema = "dtr")
19
public class PushNotifications implements Serializable {
20
 
21
	@Id
22
	@Column(name = "id", unique = true, updatable = false)
23
	@GeneratedValue(strategy = GenerationType.IDENTITY)
24
	private int id;
25
 
26
	@Column(name = "user_id")
27
	private int userId;
28
 
29
	@Column(name = "notification_campaign_id")
30
	private int notificationCampaignid;
31
 
32
	@Column(name = "type")
33
	private String type;
34
 
35
	@Column(name = "device_id")
36
	private int deviceId;
37
 
38
	@Column(name = "expiry")
39
	private boolean expire;
40
 
41
	public boolean isExpire() {
42
		return expire;
43
	}
44
 
45
	public void setExpire(boolean expire) {
46
		this.expire = expire;
47
	}
48
 
49
	@Convert(converter = LocalDateTimeAttributeConverter.class)
50
	@Column(name = "created_timestamp", updatable = false)
51
	private LocalDateTime createdTimestamp = LocalDateTime.now();
52
 
53
	@Convert(converter = LocalDateTimeAttributeConverter.class)
54
	@Column(name = "sent_timestamp", updatable = true)
55
	private LocalDateTime sentTimestamp;
56
 
57
	@Convert(converter = LocalDateTimeAttributeConverter.class)
58
	@Column(name = "received_timestamp", updatable = true)
59
	private LocalDateTime receivedTimestamp;
60
 
61
	@Convert(converter = LocalDateTimeAttributeConverter.class)
62
	@Column(name = "open_timestamp", updatable = true)
63
	private LocalDateTime openTimestamp;
64
 
65
	public int getId() {
66
		return id;
67
	}
68
 
69
	public void setId(int id) {
70
		this.id = id;
71
	}
72
 
73
	public int getUserId() {
74
		return userId;
75
	}
76
 
77
	public void setUserId(int userId) {
78
		this.userId = userId;
79
	}
80
 
81
	public int getNotificationCampaignid() {
82
		return notificationCampaignid;
83
	}
84
 
85
	public void setNotificationCampaignid(int notificationCampaignid) {
86
		this.notificationCampaignid = notificationCampaignid;
87
	}
88
 
89
	public String getType() {
90
		return type;
91
	}
92
 
93
	public void setType(String type) {
94
		this.type = type;
95
	}
96
 
97
	public int getDeviceId() {
98
		return deviceId;
99
	}
100
 
101
	public void setDeviceId(int deviceId) {
102
		this.deviceId = deviceId;
103
	}
104
 
105
	public LocalDateTime getCreatedTimestamp() {
106
		return createdTimestamp;
107
	}
108
 
109
	public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
110
		this.createdTimestamp = createdTimestamp;
111
	}
112
 
113
	public LocalDateTime getSentTimestamp() {
114
		return sentTimestamp;
115
	}
116
 
117
	public void setSentTimestamp(LocalDateTime sentTimestamp) {
118
		this.sentTimestamp = sentTimestamp;
119
	}
120
 
121
	public LocalDateTime getReceivedTimestamp() {
122
		return receivedTimestamp;
123
	}
124
 
125
	public void setReceivedTimestamp(LocalDateTime receivedTimestamp) {
126
		this.receivedTimestamp = receivedTimestamp;
127
	}
128
 
129
	public LocalDateTime getOpenTimestamp() {
130
		return openTimestamp;
131
	}
132
 
133
	public void setOpenTimestamp(LocalDateTime openTimestamp) {
134
		this.openTimestamp = openTimestamp;
135
	}
136
 
137
	@Override
138
	public String toString() {
139
		return "PushNotifications [id=" + id + ", userId=" + userId + ",notificationCampaignid=" + notificationCampaignid + ", type=" + type + ", deviceId=" + deviceId
140
				+ ", expire=" + expire + ", createdTimestamp=" + createdTimestamp + ", sentTimestamp=" + sentTimestamp
141
				+ ", receivedTimestamp=" + receivedTimestamp + ", openTimestamp=" + openTimestamp + "]";
142
	}
143
 
144
}