1 | <?php |
||
30 | class Orders |
||
31 | { |
||
32 | /** |
||
33 | * @var int |
||
34 | * |
||
35 | * @ORM\Column(name="id", type="integer") |
||
36 | * @ORM\Id |
||
37 | * @ORM\GeneratedValue(strategy="AUTO") |
||
38 | */ |
||
39 | private $id; |
||
40 | |||
41 | /** |
||
42 | * @var string|\AppBundle\Entity\Supplier Nom du fournisseur |
||
43 | * |
||
44 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Settings\Supplier") |
||
45 | */ |
||
46 | private $supplier; |
||
47 | |||
48 | /** |
||
49 | * @var \DateTime Date de commande |
||
50 | * |
||
51 | * @ORM\Column(name="order_date", type="datetime") |
||
52 | */ |
||
53 | private $orderdate; |
||
54 | |||
55 | /** |
||
56 | * @var \DateTime Date de livraison |
||
57 | * |
||
58 | * @ORM\Column(name="deliv_date", type="datetime") |
||
59 | */ |
||
60 | private $delivdate; |
||
61 | |||
62 | /** |
||
63 | * @var float Montant de la commande |
||
64 | * |
||
65 | * @ORM\Column(name="amount", type="decimal", precision=7, scale=3, nullable=true) |
||
66 | * @Assert\Type(type="numeric", |
||
67 | * message="La valeur {{ value }} n'est pas un type {{ type }} valide.") |
||
68 | */ |
||
69 | private $amount; |
||
70 | |||
71 | /** |
||
72 | * @var float Montant de la tva |
||
73 | * |
||
74 | * @ORM\Column(name="tva", type="decimal", precision=7, scale=3, nullable=true) |
||
75 | */ |
||
76 | private $tva; |
||
77 | |||
78 | /** |
||
79 | * @ORM\OneToMany(targetEntity="AppBundle\Entity\Orders\OrdersArticles", mappedBy="orders") |
||
80 | * @ORM\JoinColumn(nullable=false) |
||
81 | */ |
||
82 | private $articles; |
||
83 | |||
84 | /** |
||
85 | * @var integer |
||
86 | * |
||
87 | * @ORM\Column(name="status", type="smallint") |
||
88 | */ |
||
89 | private $status; |
||
90 | |||
91 | public function __construct() |
||
100 | |||
101 | |||
102 | /** |
||
103 | * Get id |
||
104 | * |
||
105 | * @return integer |
||
106 | */ |
||
107 | public function getId() |
||
111 | |||
112 | /** |
||
113 | * Set orderdate |
||
114 | * |
||
115 | * @param \DateTime $orderdate |
||
116 | * @return Orders |
||
117 | */ |
||
118 | public function setOrderdate(\DateTime $orderdate) |
||
124 | |||
125 | /** |
||
126 | * Get orderdate |
||
127 | * |
||
128 | * @return \DateTime |
||
129 | */ |
||
130 | public function getOrderdate() |
||
134 | |||
135 | /** |
||
136 | * Set delivdate |
||
137 | * |
||
138 | * @param \DateTime $delivdate |
||
139 | * @return Orders |
||
140 | */ |
||
141 | public function setDelivdate(\DateTime $delivdate) |
||
147 | |||
148 | /** |
||
149 | * Get delivdate |
||
150 | * |
||
151 | * @return \DateTime |
||
152 | */ |
||
153 | public function getDelivdate() |
||
157 | |||
158 | /** |
||
159 | * Set amount |
||
160 | * |
||
161 | * @param string $amount |
||
162 | * @return Orders |
||
163 | */ |
||
164 | public function setAmount($amount) |
||
170 | |||
171 | /** |
||
172 | * Get amount |
||
173 | * |
||
174 | * @return string |
||
175 | */ |
||
176 | public function getAmount() |
||
180 | |||
181 | /** |
||
182 | * Set tva |
||
183 | * |
||
184 | * @param string $tva |
||
185 | * @return Orders |
||
186 | */ |
||
187 | public function setTva($tva) |
||
193 | |||
194 | /** |
||
195 | * Get tva |
||
196 | * |
||
197 | * @return string |
||
198 | */ |
||
199 | public function getTva() |
||
203 | |||
204 | /** |
||
205 | * Set status |
||
206 | * |
||
207 | * @param integer $status |
||
208 | * @return Orders |
||
209 | */ |
||
210 | public function setStatus($status) |
||
216 | |||
217 | /** |
||
218 | * Get status |
||
219 | * |
||
220 | * @return integer |
||
221 | */ |
||
222 | public function getStatus() |
||
226 | |||
227 | /** |
||
228 | * Set supplier |
||
229 | * |
||
230 | * @param \AppBundle\Entity\Settings\Supplier $supplier |
||
231 | * @return Orders |
||
232 | */ |
||
233 | public function setSupplier(Supplier $supplier = null) |
||
239 | |||
240 | /** |
||
241 | * Get supplier |
||
242 | * |
||
243 | * @return \AppBundle\Entity\Settings\Supplier |
||
244 | */ |
||
245 | public function getSupplier() |
||
249 | |||
250 | /** |
||
251 | * Add articles |
||
252 | * |
||
253 | * @param \AppBundle\Entity\Orders\OrdersArticles $articles |
||
254 | * @return Orders |
||
255 | */ |
||
256 | public function addArticle(OrdersArticles $articles) |
||
262 | |||
263 | /** |
||
264 | * Remove articles |
||
265 | * |
||
266 | * @param \AppBundle\Entity\Orders\OrdersArticles $articles |
||
267 | */ |
||
268 | public function removeArticle(OrdersArticles $articles) |
||
272 | |||
273 | /** |
||
274 | * Get articles |
||
275 | * |
||
276 | * @return \Doctrine\Common\Collections\Collection |
||
277 | */ |
||
278 | public function getArticles() |
||
282 | } |
||
283 |