1 | <?php |
||
19 | class Discount implements DiscountInterface |
||
20 | { |
||
21 | /** |
||
22 | * @ORM\Id |
||
23 | * @ORM\GeneratedValue |
||
24 | * @ORM\Column(type="integer", name="id") |
||
25 | * |
||
26 | * @var int |
||
27 | */ |
||
28 | protected $id; |
||
29 | |||
30 | /** |
||
31 | * @ORM\Column(type="string", name="name", length=100) |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $name; |
||
36 | |||
37 | /** |
||
38 | * @ORM\Column(type="string", name="description") |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $description; |
||
43 | |||
44 | /** |
||
45 | * @ORM\OneToMany(targetEntity="Duration", mappedBy="discount") |
||
46 | * |
||
47 | * @var ArrayCollection |
||
48 | */ |
||
49 | protected $durations; |
||
50 | |||
51 | /** |
||
52 | * @ORM\Column(type="string", name="type") |
||
53 | * |
||
54 | * @var string |
||
55 | */ |
||
56 | protected $type; |
||
57 | |||
58 | /** |
||
59 | * @ORM\Column(type="float", scale=3, name="value") |
||
60 | * |
||
61 | * @var float |
||
62 | */ |
||
63 | protected $value; |
||
64 | |||
65 | /** |
||
66 | * @ORM\Column(type="boolean", name="count_based") |
||
67 | * |
||
68 | * @var bool |
||
69 | */ |
||
70 | protected $countBased = false; |
||
71 | |||
72 | /** |
||
73 | * @ORM\Column(type="datetime", name="updated_at", nullable=true) |
||
74 | * |
||
75 | * @var \DateTime |
||
76 | */ |
||
77 | protected $updatedAt; |
||
78 | |||
79 | /** |
||
80 | * @ORM\Column(type="datetime", name="created_at") |
||
81 | * |
||
82 | * @var \DateTime |
||
83 | */ |
||
84 | protected $createdAt; |
||
85 | |||
86 | /** |
||
87 | * Constructor. |
||
88 | */ |
||
89 | public function __construct() |
||
94 | |||
95 | /** |
||
96 | * Gets the value of id. |
||
97 | * |
||
98 | * @return int |
||
99 | */ |
||
100 | public function getId() |
||
104 | |||
105 | /** |
||
106 | * Sets the value of id. |
||
107 | * |
||
108 | * @param int $id the id |
||
109 | * |
||
110 | * @return self |
||
111 | */ |
||
112 | public function setId($id) |
||
118 | |||
119 | /** |
||
120 | * Gets the value of name. |
||
121 | * |
||
122 | * @return string |
||
123 | */ |
||
124 | public function getName() |
||
128 | |||
129 | /** |
||
130 | * Sets the value of name. |
||
131 | * |
||
132 | * @param string $name the name |
||
133 | * |
||
134 | * @return self |
||
135 | */ |
||
136 | public function setName($name) |
||
142 | |||
143 | /** |
||
144 | * Gets the value of description. |
||
145 | * |
||
146 | * @return string |
||
147 | */ |
||
148 | public function getDescription() |
||
152 | |||
153 | /** |
||
154 | * Sets the value of description. |
||
155 | * |
||
156 | * @param string $description the description |
||
157 | * |
||
158 | * @return self |
||
159 | */ |
||
160 | public function setDescription($description) |
||
166 | |||
167 | /** |
||
168 | * Gets the value of updatedAt. |
||
169 | * |
||
170 | * @return \DateTime |
||
171 | */ |
||
172 | public function getUpdatedAt() |
||
176 | |||
177 | /** |
||
178 | * Sets the value of updatedAt. |
||
179 | * |
||
180 | * @param \DateTime $updatedAt the updated at |
||
181 | * |
||
182 | * @return self |
||
183 | */ |
||
184 | public function setUpdatedAt(\DateTime $updatedAt) |
||
190 | |||
191 | /** |
||
192 | * Gets the value of createdAt. |
||
193 | * |
||
194 | * @return \DateTime |
||
195 | */ |
||
196 | public function getCreatedAt() |
||
200 | |||
201 | /** |
||
202 | * Sets the value of createdAt. |
||
203 | * |
||
204 | * @param \DateTime $createdAt the created at |
||
205 | * |
||
206 | * @return self |
||
207 | */ |
||
208 | public function setCreatedAt(\DateTime $createdAt) |
||
214 | |||
215 | /** |
||
216 | * {@inheritdoc} |
||
217 | */ |
||
218 | public function getType() |
||
222 | |||
223 | /** |
||
224 | * {@inheritdoc} |
||
225 | */ |
||
226 | public function setType($type) |
||
232 | |||
233 | /** |
||
234 | * {@inheritdoc} |
||
235 | */ |
||
236 | public function getValue() |
||
240 | |||
241 | /** |
||
242 | * {@inheritdoc} |
||
243 | */ |
||
244 | public function setValue($value) |
||
250 | |||
251 | /** |
||
252 | * Gets the value of countBased. |
||
253 | * |
||
254 | * @return bool |
||
255 | */ |
||
256 | public function isCountBased() |
||
260 | |||
261 | /** |
||
262 | * Sets the value of countBased. |
||
263 | * |
||
264 | * @param bool $countBased the count based |
||
265 | * |
||
266 | * @return self |
||
267 | */ |
||
268 | public function setCountBased($countBased) |
||
274 | |||
275 | /** |
||
276 | * Gets the value of durations. |
||
277 | * |
||
278 | * @return ArrayCollection |
||
279 | */ |
||
280 | public function getDurations() |
||
284 | |||
285 | /** |
||
286 | * Sets the value of durations. |
||
287 | * |
||
288 | * @param ArrayCollection $durations the durations |
||
289 | * |
||
290 | * @return self |
||
291 | */ |
||
292 | public function setDurations(ArrayCollection $durations) |
||
298 | } |
||
299 |