| 37515 |
ranu |
1 |
package com.spice.profitmandi.dao.entity.dtr;
|
|
|
2 |
|
|
|
3 |
import javax.persistence.*;
|
|
|
4 |
import java.io.Serializable;
|
|
|
5 |
import java.time.LocalDate;
|
|
|
6 |
import java.time.LocalDateTime;
|
|
|
7 |
|
|
|
8 |
/**
|
|
|
9 |
* A business-level grouping that owns one or more notification_campaign rows.
|
|
|
10 |
* Same concept the mockup calls a "Campaign" (Monsoon Restock Drive, Diwali Preview…) —
|
|
|
11 |
* every notification an admin publishes can optionally point at one of these to enable
|
|
|
12 |
* grouped analytics, bulk cancel, calendar filtering, and duplication.
|
|
|
13 |
*/
|
|
|
14 |
@SuppressWarnings("serial")
|
|
|
15 |
@Entity
|
|
|
16 |
@Table(name = "dtr.campaign_group")
|
|
|
17 |
public class CampaignGroup implements Serializable {
|
|
|
18 |
|
|
|
19 |
@Id
|
|
|
20 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
21 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
22 |
private int id;
|
|
|
23 |
|
|
|
24 |
@Column(name = "name")
|
|
|
25 |
private String name;
|
|
|
26 |
|
|
|
27 |
@Column(name = "description")
|
|
|
28 |
private String description;
|
|
|
29 |
|
|
|
30 |
@Column(name = "starts_on")
|
|
|
31 |
private LocalDate startsOn;
|
|
|
32 |
|
|
|
33 |
@Column(name = "ends_on")
|
|
|
34 |
private LocalDate endsOn;
|
|
|
35 |
|
|
|
36 |
/**
|
|
|
37 |
* ACTIVE / PAUSED / COMPLETED / ARCHIVED
|
|
|
38 |
*/
|
|
|
39 |
@Column(name = "status")
|
|
|
40 |
private String status;
|
|
|
41 |
|
|
|
42 |
@Column(name = "created_by")
|
|
|
43 |
private String createdBy;
|
|
|
44 |
|
|
|
45 |
@Column(name = "created_at", updatable = false)
|
|
|
46 |
private LocalDateTime createdAt = LocalDateTime.now();
|
|
|
47 |
|
|
|
48 |
public int getId() {
|
|
|
49 |
return id;
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
public void setId(int id) {
|
|
|
53 |
this.id = id;
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
public String getName() {
|
|
|
57 |
return name;
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
public void setName(String name) {
|
|
|
61 |
this.name = name;
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
public String getDescription() {
|
|
|
65 |
return description;
|
|
|
66 |
}
|
|
|
67 |
|
|
|
68 |
public void setDescription(String description) {
|
|
|
69 |
this.description = description;
|
|
|
70 |
}
|
|
|
71 |
|
|
|
72 |
public LocalDate getStartsOn() {
|
|
|
73 |
return startsOn;
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
public void setStartsOn(LocalDate startsOn) {
|
|
|
77 |
this.startsOn = startsOn;
|
|
|
78 |
}
|
|
|
79 |
|
|
|
80 |
public LocalDate getEndsOn() {
|
|
|
81 |
return endsOn;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
public void setEndsOn(LocalDate endsOn) {
|
|
|
85 |
this.endsOn = endsOn;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
public String getStatus() {
|
|
|
89 |
return status;
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
public void setStatus(String status) {
|
|
|
93 |
this.status = status;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
public String getCreatedBy() {
|
|
|
97 |
return createdBy;
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
public void setCreatedBy(String createdBy) {
|
|
|
101 |
this.createdBy = createdBy;
|
|
|
102 |
}
|
|
|
103 |
|
|
|
104 |
public LocalDateTime getCreatedAt() {
|
|
|
105 |
return createdAt;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
public void setCreatedAt(LocalDateTime createdAt) {
|
|
|
109 |
this.createdAt = createdAt;
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
@Override
|
|
|
113 |
public String toString() {
|
|
|
114 |
return "CampaignGroup [id=" + id + ", name=" + name + ", status=" + status
|
|
|
115 |
+ ", startsOn=" + startsOn + ", endsOn=" + endsOn + "]";
|
|
|
116 |
}
|
|
|
117 |
}
|