1 | <?php |
||
20 | class Campaign extends UserEntity |
||
21 | { |
||
22 | const DRAFT = 'draft'; |
||
23 | const PENDING = 'pending'; |
||
24 | const SENT = 'send'; |
||
25 | const CANCEL = 'cancel'; |
||
26 | const ERROR = 'error'; |
||
27 | |||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | * |
||
32 | * @ORM\Column(name="name", type="string", length=255) |
||
33 | */ |
||
34 | protected $name; |
||
35 | |||
36 | /** |
||
37 | * @var bool |
||
38 | * |
||
39 | * @ORM\Column(name="deleted", type="boolean", options={"default": false}) |
||
40 | */ |
||
41 | protected $deleted; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | * |
||
46 | * @ORM\Column(name="status", type="string", length=255) |
||
47 | */ |
||
48 | protected $status; |
||
49 | |||
50 | /** |
||
51 | * @var \DateTime |
||
52 | * |
||
53 | * @ORM\Column(name="date_start", type="datetime", nullable=true) |
||
54 | */ |
||
55 | protected $dateStart; |
||
56 | |||
57 | /** |
||
58 | * @ORM\OneToMany( |
||
59 | * targetEntity="Event", |
||
60 | * mappedBy="campaign" |
||
61 | * ) |
||
62 | */ |
||
63 | protected $events; |
||
64 | |||
65 | /** |
||
66 | * @ORM\OneToMany( |
||
67 | * targetEntity="CampaignTarget", |
||
68 | * mappedBy="campaign" |
||
69 | * ) |
||
70 | */ |
||
71 | protected $targets; |
||
72 | |||
73 | /** |
||
74 | * Constructor |
||
75 | */ |
||
76 | public function __construct() |
||
83 | |||
84 | /** |
||
85 | * Get name. |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getName() |
||
93 | |||
94 | /** |
||
95 | * Set name. |
||
96 | * |
||
97 | * @param string $name |
||
98 | * |
||
99 | */ |
||
100 | public function setName($name) |
||
105 | |||
106 | /** |
||
107 | * Get status. |
||
108 | * |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getStatus() |
||
115 | |||
116 | /** |
||
117 | * Set status. |
||
118 | * |
||
119 | * @param string $status |
||
120 | * |
||
121 | */ |
||
122 | public function setStatus($status) |
||
126 | |||
127 | /** |
||
128 | * Get deleted. |
||
129 | * |
||
130 | * @return bool |
||
131 | */ |
||
132 | public function getDeleted() |
||
136 | |||
137 | /** |
||
138 | * Set deleted. |
||
139 | * |
||
140 | * @param bool $deleted |
||
141 | * |
||
142 | */ |
||
143 | public function setDeleted($deleted) |
||
147 | |||
148 | /** |
||
149 | * Add event |
||
150 | * |
||
151 | * @param \Starkerxp\CampaignBundle\Entity\Event $event |
||
152 | * |
||
153 | * @return Campaign |
||
154 | */ |
||
155 | public function addEvent(\Starkerxp\CampaignBundle\Entity\Event $event) |
||
161 | |||
162 | /** |
||
163 | * Remove event |
||
164 | * |
||
165 | * @param \Starkerxp\CampaignBundle\Entity\Event $event |
||
166 | */ |
||
167 | public function removeEvent(\Starkerxp\CampaignBundle\Entity\Event $event) |
||
171 | |||
172 | /** |
||
173 | * Get events |
||
174 | * |
||
175 | * @return \Doctrine\Common\Collections\Collection |
||
176 | */ |
||
177 | public function getEvents() |
||
181 | |||
182 | /** |
||
183 | * Add target |
||
184 | * |
||
185 | * @param \Starkerxp\CampaignBundle\Entity\CampaignTarget $target |
||
186 | * |
||
187 | * @return Campaign |
||
188 | */ |
||
189 | public function addTarget(\Starkerxp\CampaignBundle\Entity\CampaignTarget $target) |
||
195 | |||
196 | /** |
||
197 | * Remove target |
||
198 | * |
||
199 | * @param \Starkerxp\CampaignBundle\Entity\CampaignTarget $target |
||
200 | */ |
||
201 | public function removeTarget(\Starkerxp\CampaignBundle\Entity\CampaignTarget $target) |
||
205 | |||
206 | /** |
||
207 | * Get targets |
||
208 | * |
||
209 | * @return \Doctrine\Common\Collections\Collection |
||
210 | */ |
||
211 | public function getTargets() |
||
215 | } |
||
|
|||
216 |
This check marks files that end in a newline character, i.e. an empy line.