1 | <?php |
||
15 | abstract class ProjectModel |
||
16 | { |
||
17 | /** |
||
18 | * @var int |
||
19 | * |
||
20 | * @ORM\Column(name="id", type="integer") |
||
21 | * @ORM\Id |
||
22 | * @ORM\GeneratedValue(strategy="AUTO") |
||
23 | */ |
||
24 | protected $id; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | * |
||
29 | * @ORM\Column(name="name", type="string", length=125, unique=true) |
||
30 | */ |
||
31 | protected $name; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | * |
||
36 | * @ORM\Column(name="slug", type="string", length=125, unique=true) |
||
37 | */ |
||
38 | protected $slug; |
||
39 | |||
40 | /** |
||
41 | * @var \DateTime |
||
42 | * |
||
43 | * @ORM\Column(name="created_at", type="datetime") |
||
44 | */ |
||
45 | protected $createdAt; |
||
46 | |||
47 | /** |
||
48 | * @var int |
||
49 | * |
||
50 | * @ORM\Column(name="nbBetaTesters", type="integer") |
||
51 | */ |
||
52 | protected $nbBetaTesters; |
||
53 | |||
54 | /** |
||
55 | * @var string |
||
56 | * |
||
57 | * @ORM\Column(name="betaTestStatus", type="string", length=12) |
||
58 | */ |
||
59 | protected $betaTestStatus; |
||
60 | |||
61 | /** |
||
62 | * @var object |
||
63 | * |
||
64 | * The mapping to the user class must be done by the end-user |
||
65 | */ |
||
66 | protected $productOwner; |
||
67 | |||
68 | /** |
||
69 | * @var ArrayCollection |
||
70 | * |
||
71 | * The mapping to the features can be done by the end-user but is optionnal |
||
72 | */ |
||
73 | protected $features; |
||
74 | |||
75 | 7 | public function __construct() { |
|
78 | |||
79 | /** |
||
80 | * @param integer $id |
||
81 | * @return Project |
||
82 | */ |
||
83 | 3 | public function setId($id) { |
|
88 | |||
89 | /** |
||
90 | * @ORM\PrePersist() |
||
91 | */ |
||
92 | public function prePersist() { |
||
93 | $this->createdAt = new \DateTime(); |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * Get id |
||
98 | * |
||
99 | * @return int |
||
100 | */ |
||
101 | 3 | public function getId() |
|
105 | |||
106 | /** |
||
107 | * Set name |
||
108 | * |
||
109 | * @param string $name |
||
110 | * |
||
111 | * @return ProjectModel |
||
112 | */ |
||
113 | 3 | public function setName($name) |
|
119 | |||
120 | /** |
||
121 | * Get name |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | 4 | public function getName() |
|
129 | |||
130 | /** |
||
131 | * Set slug |
||
132 | * |
||
133 | * @param string $slug |
||
134 | * |
||
135 | * @return ProjectModel |
||
136 | */ |
||
137 | 3 | public function setSlug($slug) |
|
143 | |||
144 | /** |
||
145 | * Get slug |
||
146 | * |
||
147 | * @return string |
||
148 | */ |
||
149 | 4 | public function getSlug() |
|
153 | |||
154 | /** |
||
155 | * Set createdAt |
||
156 | * |
||
157 | * @param \DateTime $createdAt |
||
158 | * |
||
159 | * @return ProjectModel |
||
160 | */ |
||
161 | 3 | public function setCreatedAt($createdAt) |
|
167 | |||
168 | /** |
||
169 | * Get createdAt |
||
170 | * |
||
171 | * @return \DateTime |
||
172 | */ |
||
173 | 1 | public function getCreatedAt() |
|
177 | |||
178 | /** |
||
179 | * Set nbBetaTesters |
||
180 | * |
||
181 | * @param integer $nbBetaTesters |
||
182 | * |
||
183 | * @return ProjectModel |
||
184 | */ |
||
185 | 3 | public function setNbBetaTesters($nbBetaTesters) |
|
191 | |||
192 | /** |
||
193 | * Get nbBetaTesters |
||
194 | * |
||
195 | * @return int |
||
196 | */ |
||
197 | 2 | public function getNbBetaTesters() |
|
201 | |||
202 | /** |
||
203 | * Set betaTestStatus |
||
204 | * |
||
205 | * @param string $betaTestStatus |
||
206 | * |
||
207 | * @return ProjectModel |
||
208 | */ |
||
209 | 3 | public function setBetaTestStatus($betaTestStatus) |
|
215 | |||
216 | /** |
||
217 | * Get betaTestStatus |
||
218 | * |
||
219 | * @return string |
||
220 | */ |
||
221 | 2 | public function getBetaTestStatus() |
|
225 | |||
226 | /** |
||
227 | * Set productOwner |
||
228 | * |
||
229 | * @param object $productOwner |
||
230 | * |
||
231 | * @return ProjectModel |
||
232 | */ |
||
233 | 4 | public function setProductOwner($productOwner) |
|
239 | |||
240 | /** |
||
241 | * Get productOwner |
||
242 | * |
||
243 | * @return object |
||
244 | */ |
||
245 | 2 | public function getProductOwner() |
|
249 | |||
250 | /** |
||
251 | * @param FeatureModel $feature |
||
252 | * @return ProjectModel |
||
253 | */ |
||
254 | 1 | public function addFeature(FeatureModel $feature) { |
|
255 | $this->features->add($feature); |
||
256 | |||
257 | 1 | return $this; |
|
258 | 1 | } |
|
259 | |||
260 | /** |
||
261 | * @param FeatureModel $feature |
||
262 | * @return ProjectModel |
||
263 | */ |
||
264 | public function removeFeature(FeatureModel $feature) { |
||
269 | |||
270 | /** |
||
271 | * @param FeatureModel $feature |
||
272 | * @return boolean |
||
273 | */ |
||
274 | public function hasFeature(FeatureModel $feature) { |
||
277 | |||
278 | /** |
||
279 | * @return ArrayCollection |
||
280 | */ |
||
281 | public function getFeatures() { |
||
284 | } |
||
285 |