Subversion Repositories SmartDukaan

Rev

Rev 29942 | 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;
36528 vikas 25
	private boolean read;
25683 tejbeer 26
 
27
	private MessageType messageType;
28
 
25651 tejbeer 29
	private Integer documentId;
30
	private String documentName;
25649 tejbeer 31
 
25683 tejbeer 32
	public MessageType getMessageType() {
33
		return messageType;
34
	}
35
 
36
	public void setMessageType(MessageType messageType) {
37
		this.messageType = messageType;
38
	}
39
 
25651 tejbeer 40
	public String getDocumentName() {
41
		return documentName;
42
	}
43
 
44
	public void setDocumentName(String documentName) {
45
		this.documentName = documentName;
46
	}
47
 
48
	public Integer getDocumentId() {
49
		return documentId;
50
	}
51
 
52
	public void setDocumentId(Integer documentId) {
53
		this.documentId = documentId;
54
	}
55
 
25649 tejbeer 56
	public String getCid() {
57
		return cid;
58
	}
59
 
60
	public void setCid(String cid) {
61
		this.cid = cid;
62
	}
63
 
64
	public String getTitle() {
65
		return title;
66
	}
67
 
29942 amit.gupta 68
	@Override
69
	public boolean equals(Object o) {
70
		if (this == o) return true;
71
		if (o == null || getClass() != o.getClass()) return false;
72
		Notification that = (Notification) o;
73
		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);
74
	}
75
 
76
	@Override
77
	public int hashCode() {
78
		return Objects.hash(cid, title, type, message, imageUrl, url, showImage, htmlUrl, created, expired, messageType, documentId, documentName);
79
	}
80
 
81
	public String getHtmlUrl() {
82
		return htmlUrl;
83
	}
84
 
85
	public void setHtmlUrl(String htmlUrl) {
86
		this.htmlUrl = htmlUrl;
87
	}
88
 
25649 tejbeer 89
	public void setTitle(String title) {
90
		this.title = title;
91
	}
92
 
93
	public String getType() {
94
		return type;
95
	}
96
 
97
	public void setType(String type) {
98
		this.type = type;
99
	}
100
 
101
	public String getMessage() {
102
		return message;
103
	}
104
 
105
	public void setMessage(String message) {
106
		this.message = message;
107
	}
108
 
109
	public String getUrl() {
110
		return url;
111
	}
112
 
113
	public void setUrl(String url) {
114
		this.url = url;
115
	}
116
 
117
	public boolean isExpired() {
118
		return expired;
119
	}
120
 
121
	public String getImageUrl() {
122
		return imageUrl;
123
	}
124
 
125
	public void setImageUrl(String imageUrl) {
126
		this.imageUrl = imageUrl;
127
	}
128
 
129
	public Boolean getShowImage() {
130
		return showImage;
131
	}
132
 
133
	public void setExpired(boolean expired) {
134
		this.expired = expired;
135
	}
136
 
36528 vikas 137
	public boolean isRead() {
138
		return read;
139
	}
140
 
141
	public void setRead(boolean read) {
142
		this.read = read;
143
	}
144
 
25649 tejbeer 145
	public long getCreated() {
146
		return created;
147
	}
148
 
149
	public void setCreated(long created) {
150
		this.created = created;
151
	}
152
 
153
	public Boolean isShowImage() {
154
		return showImage;
155
	}
156
 
157
	public void setShowImage(Boolean showImage) {
158
		this.showImage = showImage;
159
	}
160
 
161
}