|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace AppBundle\Entity; |
|
4
|
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
6
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
7
|
|
|
|
|
8
|
|
|
/** |
|
9
|
|
|
* InventoryArticles |
|
10
|
|
|
* |
|
11
|
|
|
* @ORM\Table(name="gs_inventory_articles") |
|
12
|
|
|
* @ORM\Entity(repositoryClass="AppBundle\Entity\InventoryArticlesRepository") |
|
13
|
|
|
*/ |
|
14
|
|
|
class InventoryArticles |
|
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
|
|
|
* @var string |
|
27
|
|
|
* |
|
28
|
|
|
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Inventory", inversedBy="articles") |
|
29
|
|
|
* @ORM\JoinColumn(nullable=false) |
|
30
|
|
|
*/ |
|
31
|
|
|
private $inventory; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @var string |
|
35
|
|
|
* |
|
36
|
|
|
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Article") |
|
37
|
|
|
* @ORM\JoinColumn(nullable=false) |
|
38
|
|
|
*/ |
|
39
|
|
|
private $article; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @var decimal Quantité en stock |
|
43
|
|
|
* |
|
44
|
|
|
* @ORM\Column(name="quantity", type="decimal", precision=7, scale=3) |
|
45
|
|
|
*/ |
|
46
|
|
|
private $quantity; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @var string |
|
50
|
|
|
* |
|
51
|
|
|
* @ORM\Column(name="realstock", type="decimal", precision=7, scale=3, options={"default" = 0}) |
|
52
|
|
|
*/ |
|
53
|
|
|
private $realstock; |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* @var string Unité de stockage |
|
57
|
|
|
* |
|
58
|
|
|
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\UnitStorage") |
|
59
|
|
|
* @ORM\JoinColumn(nullable=false) |
|
60
|
|
|
*/ |
|
61
|
|
|
private $unit_storage; |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @var string |
|
65
|
|
|
* |
|
66
|
|
|
* @ORM\Column(name="price", type="decimal", precision=7, scale=3, nullable=true) |
|
67
|
|
|
*/ |
|
68
|
|
|
private $price; |
|
69
|
|
|
|
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* Get id |
|
73
|
|
|
* |
|
74
|
|
|
* @return integer |
|
75
|
|
|
*/ |
|
76
|
|
|
public function getId() |
|
77
|
|
|
{ |
|
78
|
|
|
return $this->id; |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* Set inventory |
|
83
|
|
|
* |
|
84
|
|
|
* @param \AppBundle\Entity\Inventory $inventory |
|
85
|
|
|
* @return InventoryArticles |
|
86
|
|
|
*/ |
|
87
|
|
|
public function setInventory(\AppBundle\Entity\Inventory $inventory) |
|
88
|
|
|
{ |
|
89
|
|
|
$this->inventory = $inventory; |
|
|
|
|
|
|
90
|
|
|
|
|
91
|
|
|
return $this; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* Get inventory |
|
96
|
|
|
* |
|
97
|
|
|
* @return string |
|
98
|
|
|
*/ |
|
99
|
|
|
public function getInventory() |
|
100
|
|
|
{ |
|
101
|
|
|
return $this->inventory; |
|
102
|
|
|
} |
|
103
|
|
|
|
|
104
|
|
|
/** |
|
105
|
|
|
* Set article |
|
106
|
|
|
* |
|
107
|
|
|
* @param \AppBundle\Entity\Article $article |
|
108
|
|
|
* @return InventoryArticles |
|
109
|
|
|
*/ |
|
110
|
|
|
public function setArticle(\AppBundle\Entity\Article $article) |
|
111
|
|
|
{ |
|
112
|
|
|
$this->article = $article; |
|
|
|
|
|
|
113
|
|
|
|
|
114
|
|
|
return $this; |
|
115
|
|
|
} |
|
116
|
|
|
|
|
117
|
|
|
/** |
|
118
|
|
|
* Get article |
|
119
|
|
|
* |
|
120
|
|
|
* @return string |
|
121
|
|
|
*/ |
|
122
|
|
|
public function getArticle() |
|
123
|
|
|
{ |
|
124
|
|
|
return $this->article; |
|
125
|
|
|
} |
|
126
|
|
|
|
|
127
|
|
|
/** |
|
128
|
|
|
* Set realstock |
|
129
|
|
|
* |
|
130
|
|
|
* @param string $realstock |
|
131
|
|
|
* @return InventoryArticles |
|
132
|
|
|
*/ |
|
133
|
|
|
public function setRealstock($realstock) |
|
134
|
|
|
{ |
|
135
|
|
|
$this->realstock = $realstock; |
|
136
|
|
|
|
|
137
|
|
|
return $this; |
|
138
|
|
|
} |
|
139
|
|
|
|
|
140
|
|
|
/** |
|
141
|
|
|
* Get realstock |
|
142
|
|
|
* |
|
143
|
|
|
* @return string |
|
144
|
|
|
*/ |
|
145
|
|
|
public function getRealstock() |
|
146
|
|
|
{ |
|
147
|
|
|
return $this->realstock; |
|
148
|
|
|
} |
|
149
|
|
|
|
|
150
|
|
|
/** |
|
151
|
|
|
* Set Price |
|
152
|
|
|
* |
|
153
|
|
|
* @param string $price |
|
154
|
|
|
* @return InventoryArticles |
|
155
|
|
|
*/ |
|
156
|
|
|
public function setPrice($price) |
|
157
|
|
|
{ |
|
158
|
|
|
$this->price = $price; |
|
159
|
|
|
|
|
160
|
|
|
return $this; |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
/** |
|
164
|
|
|
* Get Price |
|
165
|
|
|
* |
|
166
|
|
|
* @return string |
|
167
|
|
|
*/ |
|
168
|
|
|
public function getPrice() |
|
169
|
|
|
{ |
|
170
|
|
|
return $this->price; |
|
171
|
|
|
} |
|
172
|
|
|
|
|
173
|
|
|
/** |
|
174
|
|
|
* Set quantity |
|
175
|
|
|
* |
|
176
|
|
|
* @param string $quantity |
|
177
|
|
|
* @return InventoryArticles |
|
178
|
|
|
*/ |
|
179
|
|
|
public function setQuantity($quantity) |
|
180
|
|
|
{ |
|
181
|
|
|
$this->quantity = $quantity; |
|
|
|
|
|
|
182
|
|
|
|
|
183
|
|
|
return $this; |
|
184
|
|
|
} |
|
185
|
|
|
|
|
186
|
|
|
/** |
|
187
|
|
|
* Get quantity |
|
188
|
|
|
* |
|
189
|
|
|
* @return string |
|
190
|
|
|
*/ |
|
191
|
|
|
public function getQuantity() |
|
192
|
|
|
{ |
|
193
|
|
|
return $this->quantity; |
|
194
|
|
|
} |
|
195
|
|
|
|
|
196
|
|
|
/** |
|
197
|
|
|
* Set unit_storage |
|
198
|
|
|
* |
|
199
|
|
|
* @param \AppBundle\Entity\UnitStorage $unitStorage |
|
200
|
|
|
* @return InventoryArticles |
|
201
|
|
|
*/ |
|
202
|
|
|
public function setUnitStorage(\AppBundle\Entity\UnitStorage $unitStorage = null) |
|
203
|
|
|
{ |
|
204
|
|
|
$this->unit_storage = $unitStorage; |
|
|
|
|
|
|
205
|
|
|
|
|
206
|
|
|
return $this; |
|
207
|
|
|
} |
|
208
|
|
|
|
|
209
|
|
|
/** |
|
210
|
|
|
* Get unit_storage |
|
211
|
|
|
* |
|
212
|
|
|
* @return \AppBundle\Entity\UnitStorage |
|
213
|
|
|
*/ |
|
214
|
|
|
public function getUnitStorage() |
|
215
|
|
|
{ |
|
216
|
|
|
return $this->unit_storage; |
|
217
|
|
|
} |
|
218
|
|
|
|
|
219
|
|
|
/** |
|
220
|
|
|
* Constructor |
|
221
|
|
|
*/ |
|
222
|
|
|
public function __construct() |
|
223
|
|
|
{ |
|
224
|
|
|
} |
|
225
|
|
|
|
|
226
|
|
|
/** |
|
227
|
|
|
* Set zone_storage |
|
228
|
|
|
* |
|
229
|
|
|
* @param integer $zoneStorage |
|
230
|
|
|
* @return InventoryArticles |
|
231
|
|
|
*/ |
|
232
|
|
|
public function setZoneStorage($zoneStorage) |
|
233
|
|
|
{ |
|
234
|
|
|
$this->zone_storage = $zoneStorage; |
|
|
|
|
|
|
235
|
|
|
|
|
236
|
|
|
return $this; |
|
237
|
|
|
} |
|
238
|
|
|
|
|
239
|
|
|
/** |
|
240
|
|
|
* Get zone_storage |
|
241
|
|
|
* |
|
242
|
|
|
* @return integer |
|
243
|
|
|
*/ |
|
244
|
|
|
public function getZoneStorage() |
|
245
|
|
|
{ |
|
246
|
|
|
return $this->zone_storage; |
|
247
|
|
|
} |
|
248
|
|
|
} |
|
249
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..