Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
25300 tejbeer 1
package com.spice.profitmandi.dao.entity.dtr;
2
 
37508 ranu 3
import com.spice.profitmandi.common.enumuration.MessageType;
4
import com.spice.profitmandi.common.enumuration.NotificationCategory;
5
import com.spice.profitmandi.common.enumuration.NotificationFormat;
6
 
7
import javax.persistence.*;
25300 tejbeer 8
import java.io.Serializable;
9
import java.time.LocalDateTime;
10
 
11
@SuppressWarnings("serial")
12
@Entity
31860 tejbeer 13
@Table(name = "dtr.notification_campaign")
25300 tejbeer 14
public class NotificationCampaign implements Serializable {
15
 
16
	@Id
17
	@Column(name = "id", unique = true, updatable = false)
18
	@GeneratedValue(strategy = GenerationType.IDENTITY)
19
	private int id;
20
 
21
	@Column(name = "name")
22
	private String name;
23
 
24
	@Column(name = "implementation_type")
25
	private String implementationType;
26
 
27
	@Column(name = "implementation_param")
28
	private String implementationParams;
29
 
25683 tejbeer 30
	@Column(name = "message_type")
31
	@Enumerated(EnumType.STRING)
32
	private MessageType messageType;
25649 tejbeer 33
 
25651 tejbeer 34
	@Column(name = "document_id")
35
	private Integer documentId;
36
 
37508 ranu 37
	@Column(name = "target_criteria")
38
	private String targetCriteria;
39
 
40
	@Enumerated(EnumType.STRING)
41
	@Column(name = "format")
42
	private NotificationFormat format;
43
 
44
	@Enumerated(EnumType.STRING)
45
	@Column(name = "category")
46
	private NotificationCategory category;
47
 
48
	@Column(name = "campaign_group_id")
49
	private Integer campaignGroupId;
50
 
51
	// STORED GENERATED columns — MySQL derives these from implementation_param JSON.
52
	// Read-only from Hibernate's perspective; do NOT set them directly.
53
	@Column(name = "live_from", insertable = false, updatable = false)
54
	private LocalDateTime liveFrom;
55
 
56
	@Column(name = "live_until", insertable = false, updatable = false)
57
	private LocalDateTime liveUntil;
58
 
59
	@Column(name = "expire_at", insertable = false, updatable = false)
60
	private LocalDateTime expireAt;
61
 
62
	public Integer getCampaignGroupId() {
63
		return campaignGroupId;
64
	}
65
 
66
	public void setCampaignGroupId(Integer campaignGroupId) {
67
		this.campaignGroupId = campaignGroupId;
68
	}
69
 
70
	public LocalDateTime getLiveFrom() {
71
		return liveFrom;
72
	}
73
 
74
	public LocalDateTime getLiveUntil() {
75
		return liveUntil;
76
	}
77
 
78
	public LocalDateTime getExpireAt() {
79
		return expireAt;
80
	}
81
 
25651 tejbeer 82
	public Integer getDocumentId() {
83
		return documentId;
84
	}
85
 
86
	public void setDocumentId(Integer documentId) {
87
		this.documentId = documentId;
88
	}
89
 
37508 ranu 90
	public String getTargetCriteria() {
91
		return targetCriteria;
92
	}
93
 
94
	public void setTargetCriteria(String targetCriteria) {
95
		this.targetCriteria = targetCriteria;
96
	}
97
 
98
	public NotificationFormat getFormat() {
99
		return format;
100
	}
101
 
102
	public void setFormat(NotificationFormat format) {
103
		this.format = format;
104
	}
105
 
106
	public NotificationCategory getCategory() {
107
		return category;
108
	}
109
 
110
	public void setCategory(NotificationCategory category) {
111
		this.category = category;
112
	}
113
 
25683 tejbeer 114
	public MessageType getMessageType() {
115
		return messageType;
25649 tejbeer 116
	}
117
 
25683 tejbeer 118
	public void setMessageType(MessageType messageType) {
119
		this.messageType = messageType;
25649 tejbeer 120
	}
121
 
25300 tejbeer 122
	@Column(name = "created_timestamp")
123
	private LocalDateTime createdTimestamp;
124
 
125
	public LocalDateTime getCreatedTimestamp() {
126
		return createdTimestamp;
127
	}
128
 
129
	public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
130
		this.createdTimestamp = createdTimestamp;
131
	}
132
 
133
	public int getId() {
134
		return id;
135
	}
136
 
137
	public void setId(int id) {
138
		this.id = id;
139
	}
140
 
141
	public String getName() {
142
		return name;
143
	}
144
 
145
	public void setName(String name) {
146
		this.name = name;
147
	}
148
 
149
	public String getImplementationType() {
150
		return implementationType;
151
	}
152
 
153
	public void setImplementationType(String implementationType) {
154
		this.implementationType = implementationType;
155
	}
156
 
157
	public String getImplementationParams() {
158
		return implementationParams;
159
	}
160
 
161
	public void setImplementationParams(String implementationParams) {
162
		this.implementationParams = implementationParams;
163
	}
164
 
165
	@Override
166
	public String toString() {
167
		return "NotificationCampaign [id=" + id + ", name=" + name + ", implementationType=" + implementationType
25683 tejbeer 168
				+ ", implementationParams=" + implementationParams + ", messageType=" + messageType + ", documentId="
37508 ranu 169
				+ documentId + ", createdTimestamp=" + createdTimestamp + ", targetCriteria=" + targetCriteria
170
				+ ", format=" + format + ", category=" + category + "]";
25300 tejbeer 171
	}
172
 
173
}