Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.dtr;import java.io.Serializable;import java.time.LocalDateTime;import javax.persistence.Column;import javax.persistence.Convert;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.Table;import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;@SuppressWarnings("serial")@Entity@Table(name = "dtr.pushnotifications", schema = "dtr")public class PushNotifications implements Serializable {@Id@Column(name = "id", unique = true, updatable = false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name = "user_id")private int userId;@Column(name = "notification_campaign_id")private int notificationCampaignid;@Column(name = "type")private String type;@Column(name = "device_id")private int deviceId;@Column(name = "expiry")private boolean expire;public boolean isExpire() {return expire;}public void setExpire(boolean expire) {this.expire = expire;}@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name = "created_timestamp", updatable = false)private LocalDateTime createdTimestamp = LocalDateTime.now();@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name = "sent_timestamp", updatable = true)private LocalDateTime sentTimestamp;@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name = "received_timestamp", updatable = true)private LocalDateTime receivedTimestamp;@Convert(converter = LocalDateTimeAttributeConverter.class)@Column(name = "open_timestamp", updatable = true)private LocalDateTime openTimestamp;public int getId() {return id;}public void setId(int id) {this.id = id;}public int getUserId() {return userId;}public void setUserId(int userId) {this.userId = userId;}public int getNotificationCampaignid() {return notificationCampaignid;}public void setNotificationCampaignid(int notificationCampaignid) {this.notificationCampaignid = notificationCampaignid;}public String getType() {return type;}public void setType(String type) {this.type = type;}public int getDeviceId() {return deviceId;}public void setDeviceId(int deviceId) {this.deviceId = deviceId;}public LocalDateTime getCreatedTimestamp() {return createdTimestamp;}public void setCreatedTimestamp(LocalDateTime createdTimestamp) {this.createdTimestamp = createdTimestamp;}public LocalDateTime getSentTimestamp() {return sentTimestamp;}public void setSentTimestamp(LocalDateTime sentTimestamp) {this.sentTimestamp = sentTimestamp;}public LocalDateTime getReceivedTimestamp() {return receivedTimestamp;}public void setReceivedTimestamp(LocalDateTime receivedTimestamp) {this.receivedTimestamp = receivedTimestamp;}public LocalDateTime getOpenTimestamp() {return openTimestamp;}public void setOpenTimestamp(LocalDateTime openTimestamp) {this.openTimestamp = openTimestamp;}@Overridepublic String toString() {return "PushNotifications [id=" + id + ", userId=" + userId + ",notificationCampaignid=" + notificationCampaignid + ", type=" + type + ", deviceId=" + deviceId+ ", expire=" + expire + ", createdTimestamp=" + createdTimestamp + ", sentTimestamp=" + sentTimestamp+ ", receivedTimestamp=" + receivedTimestamp + ", openTimestamp=" + openTimestamp + "]";}}