Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
25649 tejbeer 1
package com.spice.profitmandi.common.model;
2
 
29942 amit.gupta 3
import com.spice.profitmandi.common.enumuration.MessageType;
4
 
25651 tejbeer 5
import java.time.LocalDateTime;
6
import java.time.ZoneOffset;
29942 amit.gupta 7
import java.util.Objects;
25651 tejbeer 8
 
25649 tejbeer 9
public class Notification {
10
	private String cid;
11
	private String title;
12
	private String type;
13
	private String message;
14
	private String imageUrl;
15
	private String url;
16
	private Boolean showImage;
29942 amit.gupta 17
	private String htmlUrl;
25649 tejbeer 18
	private long created;
25683 tejbeer 19
 
25651 tejbeer 20
	public LocalDateTime getDate() {
25683 tejbeer 21
		return LocalDateTime.ofEpochSecond(created / 1000, 0, ZoneOffset.ofHoursMinutes(5, 30));
25651 tejbeer 22
	}
25683 tejbeer 23
 
25649 tejbeer 24
	private boolean expired;
25683 tejbeer 25
 
26
	private MessageType messageType;
27
 
25651 tejbeer 28
	private Integer documentId;
29
	private String documentName;
25649 tejbeer 30
 
25683 tejbeer 31
	public MessageType getMessageType() {
32
		return messageType;
33
	}
34
 
35
	public void setMessageType(MessageType messageType) {
36
		this.messageType = messageType;
37
	}
38
 
25651 tejbeer 39
	public String getDocumentName() {
40
		return documentName;
41
	}
42
 
43
	public void setDocumentName(String documentName) {
44
		this.documentName = documentName;
45
	}
46
 
47
	public Integer getDocumentId() {
48
		return documentId;
49
	}
50
 
51
	public void setDocumentId(Integer documentId) {
52
		this.documentId = documentId;
53
	}
54
 
25649 tejbeer 55
	public String getCid() {
56
		return cid;
57
	}
58
 
59
	public void setCid(String cid) {
60
		this.cid = cid;
61
	}
62
 
63
	public String getTitle() {
64
		return title;
65
	}
66
 
29942 amit.gupta 67
	@Override
68
	public boolean equals(Object o) {
69
		if (this == o) return true;
70
		if (o == null || getClass() != o.getClass()) return false;
71
		Notification that = (Notification) o;
72
		return created == that.created && expired == that.expired && Objects.equals(cid, that.cid) && Objects.equals(title, that.title) && Objects.equals(type, that.type) && Objects.equals(message, that.message) && Objects.equals(imageUrl, that.imageUrl) && Objects.equals(url, that.url) && Objects.equals(showImage, that.showImage) && Objects.equals(htmlUrl, that.htmlUrl) && messageType == that.messageType && Objects.equals(documentId, that.documentId) && Objects.equals(documentName, that.documentName);
73
	}
74
 
75
	@Override
76
	public int hashCode() {
77
		return Objects.hash(cid, title, type, message, imageUrl, url, showImage, htmlUrl, created, expired, messageType, documentId, documentName);
78
	}
79
 
80
	public String getHtmlUrl() {
81
		return htmlUrl;
82
	}
83
 
84
	public void setHtmlUrl(String htmlUrl) {
85
		this.htmlUrl = htmlUrl;
86
	}
87
 
25649 tejbeer 88
	public void setTitle(String title) {
89
		this.title = title;
90
	}
91
 
92
	public String getType() {
93
		return type;
94
	}
95
 
96
	public void setType(String type) {
97
		this.type = type;
98
	}
99
 
100
	public String getMessage() {
101
		return message;
102
	}
103
 
104
	public void setMessage(String message) {
105
		this.message = message;
106
	}
107
 
108
	public String getUrl() {
109
		return url;
110
	}
111
 
112
	public void setUrl(String url) {
113
		this.url = url;
114
	}
115
 
116
	public boolean isExpired() {
117
		return expired;
118
	}
119
 
120
	public String getImageUrl() {
121
		return imageUrl;
122
	}
123
 
124
	public void setImageUrl(String imageUrl) {
125
		this.imageUrl = imageUrl;
126
	}
127
 
128
	public Boolean getShowImage() {
129
		return showImage;
130
	}
131
 
132
	public void setExpired(boolean expired) {
133
		this.expired = expired;
134
	}
135
 
136
	public long getCreated() {
137
		return created;
138
	}
139
 
140
	public void setCreated(long created) {
141
		this.created = created;
142
	}
143
 
144
	public Boolean isShowImage() {
145
		return showImage;
146
	}
147
 
148
	public void setShowImage(Boolean showImage) {
149
		this.showImage = showImage;
150
	}
151
 
152
}