1 | <?php |
||
17 | class Event extends AggregateResource |
||
18 | { |
||
19 | /** |
||
20 | * @var integer |
||
21 | * @ORM\Column(name="id", type="integer") |
||
22 | * @ORM\Id |
||
23 | * @ORM\GeneratedValue(strategy="AUTO") |
||
24 | */ |
||
25 | protected $id; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | * @Assert\NotBlank() |
||
30 | * @ORM\Column(type="text") |
||
31 | */ |
||
32 | protected $name; |
||
33 | |||
34 | /** |
||
35 | * @var integer |
||
36 | * @Assert\NotBlank() |
||
37 | * @Assert\Type(type="integer") |
||
38 | * @Assert\Range(min=1) |
||
39 | * @ORM\Column(type="integer") |
||
40 | */ |
||
41 | protected $capacity; |
||
42 | |||
43 | /** |
||
44 | * @var \DateTime |
||
45 | * @ORM\Column(type="datetime") |
||
46 | * @Assert\NotBlank() |
||
47 | * @Assert\Type(type="\DateTime") |
||
48 | */ |
||
49 | protected $start; |
||
50 | |||
51 | /** |
||
52 | * @var \DateTime |
||
53 | * @ORM\Column(type="datetime", name="registration_start") |
||
54 | * @Assert\NotBlank() |
||
55 | * @Assert\Type(type="\DateTime") |
||
56 | */ |
||
57 | protected $registrationStart; |
||
58 | |||
59 | /** |
||
60 | * @var \DateTime |
||
61 | * @ORM\Column(type="datetime", name="registration_end") |
||
62 | * @Assert\NotBlank() |
||
63 | * @Assert\Type(type="\DateTime") |
||
64 | */ |
||
65 | protected $registrationEnd; |
||
66 | |||
67 | /** |
||
68 | * Price for aticket in cents (including VAT) |
||
69 | * |
||
70 | * @var integer |
||
71 | * @Assert\NotBlank() |
||
72 | * @Assert\Type(type="integer") |
||
73 | * @Assert\Range(min=1) |
||
74 | * @ORM\Column(type="integer") |
||
75 | */ |
||
76 | protected $price; |
||
77 | |||
78 | /** |
||
79 | * @Gedmo\Timestampable(on="create") |
||
80 | * @ORM\Column(type="datetime") |
||
81 | * @var \DateTime |
||
82 | */ |
||
83 | protected $created; |
||
84 | |||
85 | /** |
||
86 | * @Gedmo\Timestampable(on="update") |
||
87 | * @ORM\Column(type="datetime", nullable=true) |
||
88 | * @var \DateTime |
||
89 | */ |
||
90 | protected $updated; |
||
91 | |||
92 | /** |
||
93 | * @ORM\OneToMany(targetEntity="BCRM\BackendBundle\Entity\Event\Registration", mappedBy="event") |
||
94 | * @var Registration[] |
||
95 | */ |
||
96 | protected $registrations; |
||
97 | |||
98 | /** |
||
99 | * @ORM\OneToMany(targetEntity="BCRM\BackendBundle\Entity\Event\Unregistration", mappedBy="event") |
||
100 | * @var Unregistration[] |
||
101 | */ |
||
102 | protected $unregistrations; |
||
103 | |||
104 | /** |
||
105 | * @ORM\OneToMany(targetEntity="BCRM\BackendBundle\Entity\Event\Ticket", mappedBy="event") |
||
106 | * @var Ticket[] |
||
107 | */ |
||
108 | protected $tickets; |
||
109 | |||
110 | /** |
||
111 | * Get id |
||
112 | * |
||
113 | * @return integer |
||
114 | */ |
||
115 | public function getId() |
||
119 | |||
120 | /** |
||
121 | * @return int |
||
122 | */ |
||
123 | public function getCapacity() |
||
127 | |||
128 | /** |
||
129 | * @param int $capacity |
||
130 | */ |
||
131 | public function setCapacity($capacity) |
||
135 | |||
136 | /** |
||
137 | * @return string |
||
138 | */ |
||
139 | public function getName() |
||
143 | |||
144 | /** |
||
145 | * @param string $name |
||
146 | */ |
||
147 | public function setName($name) |
||
151 | |||
152 | /** |
||
153 | * @return int |
||
154 | */ |
||
155 | public function getPrice() |
||
156 | { |
||
157 | return $this->price; |
||
158 | } |
||
159 | |||
160 | /** |
||
161 | * @param int $price |
||
162 | */ |
||
163 | public function setPrice($price) |
||
164 | { |
||
165 | $this->price = (int)$price; |
||
166 | } |
||
167 | |||
168 | /** |
||
169 | * @return \DateTime |
||
170 | */ |
||
171 | public function getRegistrationStart() |
||
175 | |||
176 | /** |
||
177 | * @param \DateTime $registrationStart |
||
178 | */ |
||
179 | public function setRegistrationStart(\DateTime $registrationStart) |
||
183 | |||
184 | /** |
||
185 | * @return \DateTime |
||
186 | */ |
||
187 | public function getStart() |
||
191 | |||
192 | /** |
||
193 | * @param \DateTime $start |
||
194 | */ |
||
195 | public function setStart(\DateTime $start) |
||
199 | |||
200 | public function __toString() |
||
205 | |||
206 | /** |
||
207 | * @param \DateTime $registrationEnd |
||
208 | */ |
||
209 | public function setRegistrationEnd(\DateTime $registrationEnd) |
||
213 | |||
214 | /** |
||
215 | * @return \DateTime |
||
216 | */ |
||
217 | public function getRegistrationEnd() |
||
221 | } |
||
222 | |||
223 |