fix lists in readme
[mixstore.git] / src / Mixstore / StoreBundle / Entity / Usecase.php
CommitLineData
929ca066
BA
1<?php
2
3namespace Mixstore\StoreBundle\Entity;
4
5use Doctrine\ORM\Mapping as ORM;
6use Symfony\Component\Validator\Constraints as Assert;
7
8/**
9 * Usecase
10 *
11 * @ORM\Table()
12 * @ORM\Entity(repositoryClass="Mixstore\StoreBundle\Entity\UsecaseRepository")
13 */
14class Usecase
15{
16 /**
17 * @var integer
18 *
19 * @ORM\Column(name="id", type="integer")
20 * @ORM\Id
21 * @ORM\GeneratedValue(strategy="AUTO")
22 */
23 private $id;
24
25 /**
26 * @ORM\Column(type="datetime")
27 * @Assert\NotBlank()
28 */
29 private $created;
30
31 /**
32 * @ORM\Column(type="datetime")
33 * @Assert\NotBlank()
34 */
35 private $modified;
36
37 /**
38 * @ORM\Column(type="string")
39 * @Assert\NotBlank()
40 */
41 private $institution;
42
43 /**
44 * @ORM\Column(type="string")
45 * @Assert\NotBlank()
46 */
47 private $headline; //titre du usecase
48
49 /**
50 * @ORM\Column(type="text")
51 * @Assert\NotBlank()
52 */
53 private $description;
54
55 /**
56 * @ORM\Column(type="string")
57 * @Assert\NotBlank()
58 * @Assert\Email()
59 */
60 private $contact; //un email
61
62 /**
63 * @ORM\ManyToOne(targetEntity="Mixstore\UserBundle\Entity\User")
64 * @ORM\JoinColumn(nullable=false)
65 */
66 private $user; //owner of the usecase: "webmaster"...
67
68 /**
69 * @ORM\Column(type="decimal")
70 * @Assert\NotBlank()
71 */
72 private $grade; //from 0 to 10 (integer, in fact)
73
74 /**
75 * @ORM\ManyToOne(targetEntity="Mixstore\StoreBundle\Entity\Package")
76 * @ORM\JoinColumn(nullable=false)
77 */
78 private $package;
79
80 public function __construct()
81 {
82 $this->user = null;
83 $this->id = 0;
84 $this->created = new \DateTime("now");
85 $this->modified = new \DateTime("now");
86 }
87
88 /**
89 * Get id
90 *
91 * @return integer
92 */
93 public function getId()
94 {
95 return $this->id;
96 }
97
98 /**
99 * Set institution
100 *
101 * @param string $institution
102 * @return Usecase
103 */
104 public function setInstitution($institution)
105 {
106 $this->institution = $institution;
107
108 return $this;
109 }
110
111 /**
112 * Get institution
113 *
114 * @return string
115 */
116 public function getInstitution()
117 {
118 return $this->institution;
119 }
120
121 /**
122 * Set description
123 *
124 * @param string $description
125 * @return Usecase
126 */
127 public function setDescription($description)
128 {
129 $this->description = $description;
130
131 return $this;
132 }
133
134 /**
135 * Get description
136 *
137 * @return string
138 */
139 public function getDescription()
140 {
141 return $this->description;
142 }
143
144 /**
145 * Set contact
146 *
147 * @param string $contact
148 * @return Usecase
149 */
150 public function setContact($contact)
151 {
152 $this->contact = $contact;
153
154 return $this;
155 }
156
157 /**
158 * Get contact
159 *
160 * @return string
161 */
162 public function getContact()
163 {
164 return $this->contact;
165 }
166
167 /**
168 * Set user
169 *
170 * @param \Mixstore\UserBundle\Entity\User $user
171 * @return Usecase
172 */
173 public function setUser(\Mixstore\UserBundle\Entity\User $user)
174 {
175 $this->user = $user;
176
177 return $this;
178 }
179
180 /**
181 * Get user
182 *
183 * @return \Mixstore\UserBundle\Entity\User
184 */
185 public function getUser()
186 {
187 return $this->user;
188 }
189
190 /**
191 * Set headline
192 *
193 * @param string $headline
194 * @return Usecase
195 */
196 public function setHeadline($headline)
197 {
198 $this->headline = $headline;
199
200 return $this;
201 }
202
203 /**
204 * Get headline
205 *
206 * @return string
207 */
208 public function getHeadline()
209 {
210 return $this->headline;
211 }
212
213 /**
214 * Set package
215 *
216 * @param \Mixstore\StoreBundle\Entity\Package $package
217 * @return Usecase
218 */
219 public function setPackage(\Mixstore\StoreBundle\Entity\Package $package)
220 {
221 $this->package = $package;
222
223 return $this;
224 }
225
226 /**
227 * Get package
228 *
229 * @return \Mixstore\StoreBundle\Entity\Package
230 */
231 public function getPackage()
232 {
233 return $this->package;
234 }
235
236 /**
237 * Set grade
238 *
239 * @param boolean $happy
240 * @return Usecase
241 */
242 public function setGrade($grade)
243 {
244 $this->grade = $grade;
245
246 return $this;
247 }
248
249 /**
250 * Get grade
251 *
252 * @return boolean
253 */
254 public function getGrade()
255 {
256 return $this->grade;
257 }
258
259 /**
260 * Set created
261 *
262 * @param \DateTime $created
263 * @return Usecase
264 */
265 public function setCreated($created)
266 {
267 $this->created = $created;
268
269 return $this;
270 }
271
272 /**
273 * Get created
274 *
275 * @return \DateTime
276 */
277 public function getCreated()
278 {
279 return $this->created;
280 }
281
282 /**
283 * Set modified
284 *
285 * @param \DateTime $modified
286 * @return Usecase
287 */
288 public function setModified($modified)
289 {
290 $this->modified = $modified;
291
292 return $this;
293 }
294
295 /**
296 * Get modified
297 *
298 * @return \DateTime
299 */
300 public function getModified()
301 {
302 return $this->modified;
303 }
304}