1 | <?php |
||
29 | class Inventory |
||
30 | { |
||
31 | /** |
||
32 | * @var integer |
||
33 | * |
||
34 | * @ORM\Column(name="id", type="integer") |
||
35 | * @ORM\Id |
||
36 | * @ORM\GeneratedValue(strategy="AUTO") |
||
37 | */ |
||
38 | private $id; |
||
39 | |||
40 | /** |
||
41 | * @var \DateTime |
||
42 | * |
||
43 | * @ORM\Column(name="date", type="datetime") |
||
44 | */ |
||
45 | private $date; |
||
46 | |||
47 | /** |
||
48 | * @var integer |
||
49 | * |
||
50 | * @ORM\Column(name="status", type="smallint") |
||
51 | */ |
||
52 | private $status; |
||
53 | |||
54 | |||
55 | /** |
||
56 | * @var float Montant de l'inventaire |
||
57 | * |
||
58 | * @ORM\Column(name="amount", type="decimal", precision=7, scale=3, nullable=true) |
||
59 | */ |
||
60 | private $amount; |
||
61 | |||
62 | /** |
||
63 | * @ORM\OneToMany(targetEntity="AppBundle\Entity\Stocks\InventoryArticles", mappedBy="inventory") |
||
64 | * @ORM\JoinColumn(nullable=false) |
||
65 | */ |
||
66 | private $articles; |
||
67 | |||
68 | public function __construct() |
||
75 | |||
76 | /** |
||
77 | * Get id |
||
78 | * |
||
79 | * @return integer |
||
80 | */ |
||
81 | public function getId() |
||
85 | |||
86 | /** |
||
87 | * Set date |
||
88 | * |
||
89 | * @param \DateTime $date |
||
90 | * @return Inventory |
||
91 | */ |
||
92 | public function setDate(\DateTime $date) |
||
98 | |||
99 | /** |
||
100 | * Get date |
||
101 | * |
||
102 | * @return \DateTime |
||
103 | */ |
||
104 | public function getDate() |
||
108 | |||
109 | /** |
||
110 | * Set amount |
||
111 | * |
||
112 | * @param float $amount |
||
113 | * @return Inventory |
||
114 | */ |
||
115 | public function setAmount($amount) |
||
121 | |||
122 | /** |
||
123 | * Get amount |
||
124 | * |
||
125 | * @return double |
||
126 | */ |
||
127 | public function getAmount() |
||
131 | |||
132 | /** |
||
133 | * Set status |
||
134 | * |
||
135 | * @param integer $status |
||
136 | * @return Inventory |
||
137 | */ |
||
138 | public function setStatus($status) |
||
144 | |||
145 | /** |
||
146 | * Get status |
||
147 | * |
||
148 | * @return integer |
||
149 | */ |
||
150 | public function getStatus() |
||
154 | |||
155 | /** |
||
156 | * Add articles |
||
157 | * |
||
158 | * @param \AppBundle\Entity\Stocks\InventoryArticles $articles |
||
159 | * @return Inventory |
||
160 | */ |
||
161 | public function addArticle(InventoryArticles $articles) |
||
167 | |||
168 | /** |
||
169 | * Remove articles |
||
170 | * |
||
171 | * @param \AppBundle\Entity\Stocks\InventoryArticles $articles |
||
172 | */ |
||
173 | public function removeArticle(InventoryArticles $articles) |
||
177 | |||
178 | /** |
||
179 | * Get articles |
||
180 | * |
||
181 | * @return \Doctrine\Common\Collections\ArrayCollection |
||
182 | */ |
||
183 | public function getArticles() |
||
187 | } |
||
188 |