| 37513 |
ranu |
1 |
package com.spice.profitmandi.dao.entity.dtr;
|
|
|
2 |
|
|
|
3 |
import com.spice.profitmandi.common.enumuration.ScheduleStatus;
|
|
|
4 |
|
|
|
5 |
import javax.persistence.*;
|
|
|
6 |
import java.time.LocalDateTime;
|
|
|
7 |
|
|
|
8 |
@Entity
|
|
|
9 |
@Table(name = "dtr.notification_schedule")
|
|
|
10 |
public class NotificationSchedule {
|
|
|
11 |
|
|
|
12 |
@Id
|
|
|
13 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
14 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
15 |
private int id;
|
|
|
16 |
|
|
|
17 |
@Column(name = "campaign_id")
|
|
|
18 |
private int campaignId;
|
|
|
19 |
|
|
|
20 |
@Column(name = "scheduled_timestamp")
|
|
|
21 |
private LocalDateTime scheduledTimestamp;
|
|
|
22 |
|
|
|
23 |
@Enumerated(EnumType.STRING)
|
|
|
24 |
@Column(name = "status")
|
|
|
25 |
private ScheduleStatus status;
|
|
|
26 |
|
|
|
27 |
@Column(name = "dispatched_timestamp")
|
|
|
28 |
private LocalDateTime dispatchedTimestamp;
|
|
|
29 |
|
|
|
30 |
@Column(name = "created_timestamp", updatable = false)
|
|
|
31 |
private LocalDateTime createdTimestamp = LocalDateTime.now();
|
|
|
32 |
|
|
|
33 |
public int getId() {
|
|
|
34 |
return id;
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
public void setId(int id) {
|
|
|
38 |
this.id = id;
|
|
|
39 |
}
|
|
|
40 |
|
|
|
41 |
public int getCampaignId() {
|
|
|
42 |
return campaignId;
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
public void setCampaignId(int campaignId) {
|
|
|
46 |
this.campaignId = campaignId;
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
public LocalDateTime getScheduledTimestamp() {
|
|
|
50 |
return scheduledTimestamp;
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
public void setScheduledTimestamp(LocalDateTime scheduledTimestamp) {
|
|
|
54 |
this.scheduledTimestamp = scheduledTimestamp;
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
public ScheduleStatus getStatus() {
|
|
|
58 |
return status;
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
public void setStatus(ScheduleStatus status) {
|
|
|
62 |
this.status = status;
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
public LocalDateTime getDispatchedTimestamp() {
|
|
|
66 |
return dispatchedTimestamp;
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
public void setDispatchedTimestamp(LocalDateTime dispatchedTimestamp) {
|
|
|
70 |
this.dispatchedTimestamp = dispatchedTimestamp;
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
public LocalDateTime getCreatedTimestamp() {
|
|
|
74 |
return createdTimestamp;
|
|
|
75 |
}
|
|
|
76 |
|
|
|
77 |
public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
|
|
|
78 |
this.createdTimestamp = createdTimestamp;
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
@Override
|
|
|
82 |
public String toString() {
|
|
|
83 |
return "NotificationSchedule [id=" + id + ", campaignId=" + campaignId + ", scheduledTimestamp="
|
|
|
84 |
+ scheduledTimestamp + ", status=" + status + ", dispatchedTimestamp=" + dispatchedTimestamp
|
|
|
85 |
+ ", createdTimestamp=" + createdTimestamp + "]";
|
|
|
86 |
}
|
|
|
87 |
}
|