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