1: <?php
2:
3:
4:
5:
6:
7: /**
8: * CommercialArticle
9: *
10: * @Table(name="COMMERCIAL_ARTICLE")
11: * @Entity
12: */
13: class CommercialArticle
14: {
15: /**
16: * @var string $companyRef
17: *
18: * @Column(name="company_ref", type="string", length=45)
19: */
20: private $companyRef;
21:
22: /**
23: * @var string $manufacturerRef
24: *
25: * @Column(name="manufacturer_ref", type="string", length=45)
26: */
27: private $manufacturerRef;
28:
29: /**
30: * @var string $designation
31: *
32: * @Column(name="designation", type="string", length=120)
33: */
34: private $designation;
35:
36: /**
37: * @var text $description
38: *
39: * @Column(name="description", type="text")
40: */
41: private $description;
42:
43: /**
44: * @var decimal $purchasingPriceDf
45: *
46: * @Column(name="purchasing_price_df", type="decimal")
47: */
48: private $purchasingPriceDf;
49:
50: /**
51: * @var decimal $sellingPriceDf
52: *
53: * @Column(name="selling_price_df", type="decimal")
54: */
55: private $sellingPriceDf;
56:
57: /**
58: * @var decimal $taxRate
59: *
60: * @Column(name="tax_rate", type="decimal")
61: */
62: private $taxRate;
63:
64: /**
65: * @var boolean $isGroup
66: *
67: * @Column(name="is_group", type="boolean")
68: */
69: private $isGroup;
70:
71: /**
72: * @var integer $id
73: *
74: * @Column(name="id", type="integer")
75: * @Id
76: * @GeneratedValue(strategy="IDENTITY")
77: */
78: private $id;
79:
80: /**
81: * @var CommercialSellingAccount
82: *
83: * @ManyToOne(targetEntity="CommercialSellingAccount")
84: * @JoinColumns({
85: * @JoinColumn(name="selling_account_id", referencedColumnName="id")
86: * })
87: */
88: private $sellingAccount;
89:
90: /**
91: * @var CoreCompanies
92: *
93: * @ManyToOne(targetEntity="CoreCompanies")
94: * @JoinColumns({
95: * @JoinColumn(name="company_id", referencedColumnName="id")
96: * })
97: */
98: private $company;
99:
100: /**
101: * @var CommercialArticle
102: *
103: * @ManyToOne(targetEntity="CommercialArticle")
104: * @JoinColumns({
105: * @JoinColumn(name="parent_id", referencedColumnName="id")
106: * })
107: */
108: private $parent;
109:
110: /**
111: * @var \Doctrine\Common\Collections\ArrayCollection
112: *
113: * @ManyToMany(targetEntity="CommercialArticleCategory", inversedBy="article", orphanRemoval=true)
114: * @JoinTable(name="commercial_assoc_arcicles_categories",
115: * joinColumns={
116: * @JoinColumn(name="article_id", referencedColumnName="id")
117: * },
118: * inverseJoinColumns={
119: * @JoinColumn(name="category_label", referencedColumnName="label")
120: * }
121: * )
122: */
123: private $categoryLabel;
124:
125: public function __construct()
126: {
127: $this->categoryLabel = new \Doctrine\Common\Collections\ArrayCollection();
128: }
129:
130: /**
131: * Set companyRef
132: *
133: * @param string $companyRef
134: * @return CommercialArticle
135: */
136: public function setCompanyRef($companyRef)
137: {
138: $this->companyRef = $companyRef;
139: return $this;
140: }
141:
142: /**
143: * Get companyRef
144: *
145: * @return string
146: */
147: public function getCompanyRef()
148: {
149: return $this->companyRef;
150: }
151:
152: /**
153: * Set manufacturerRef
154: *
155: * @param string $manufacturerRef
156: * @return CommercialArticle
157: */
158: public function setManufacturerRef($manufacturerRef)
159: {
160: $this->manufacturerRef = $manufacturerRef;
161: return $this;
162: }
163:
164: /**
165: * Get manufacturerRef
166: *
167: * @return string
168: */
169: public function getManufacturerRef()
170: {
171: return $this->manufacturerRef;
172: }
173:
174: /**
175: * Set designation
176: *
177: * @param string $designation
178: * @return CommercialArticle
179: */
180: public function setDesignation($designation)
181: {
182: $this->designation = $designation;
183: return $this;
184: }
185:
186: /**
187: * Get designation
188: *
189: * @return string
190: */
191: public function getDesignation()
192: {
193: return $this->designation;
194: }
195:
196: /**
197: * Set description
198: *
199: * @param text $description
200: * @return CommercialArticle
201: */
202: public function setDescription($description)
203: {
204: $this->description = $description;
205: return $this;
206: }
207:
208: /**
209: * Get description
210: *
211: * @return text
212: */
213: public function getDescription()
214: {
215: return $this->description;
216: }
217:
218: /**
219: * Set purchasingPriceDf
220: *
221: * @param decimal $purchasingPriceDf
222: * @return CommercialArticle
223: */
224: public function setPurchasingPriceDf($purchasingPriceDf)
225: {
226: $this->purchasingPriceDf = $purchasingPriceDf;
227: return $this;
228: }
229:
230: /**
231: * Get purchasingPriceDf
232: *
233: * @return decimal
234: */
235: public function getPurchasingPriceDf()
236: {
237: return $this->purchasingPriceDf;
238: }
239:
240: /**
241: * Set sellingPriceDf
242: *
243: * @param decimal $sellingPriceDf
244: * @return CommercialArticle
245: */
246: public function setSellingPriceDf($sellingPriceDf)
247: {
248: $this->sellingPriceDf = $sellingPriceDf;
249: return $this;
250: }
251:
252: /**
253: * Get sellingPriceDf
254: *
255: * @return decimal
256: */
257: public function getSellingPriceDf()
258: {
259: return $this->sellingPriceDf;
260: }
261:
262: /**
263: * Set taxRate
264: *
265: * @param decimal $taxRate
266: * @return CommercialArticle
267: */
268: public function setTaxRate($taxRate)
269: {
270: $this->taxRate = $taxRate;
271: return $this;
272: }
273:
274: /**
275: * Get taxRate
276: *
277: * @return decimal
278: */
279: public function getTaxRate()
280: {
281: return $this->taxRate;
282: }
283:
284: /**
285: * Set isGroup
286: *
287: * @param boolean $isGroup
288: * @return CommercialArticle
289: */
290: public function setIsGroup($isGroup)
291: {
292: $this->isGroup = $isGroup;
293: return $this;
294: }
295:
296: /**
297: * Get isGroup
298: *
299: * @return boolean
300: */
301: public function getIsGroup()
302: {
303: return $this->isGroup;
304: }
305:
306: /**
307: * Get id
308: *
309: * @return integer
310: */
311: public function getId()
312: {
313: return $this->id;
314: }
315:
316: /**
317: * Set sellingAccount
318: *
319: * @param CommercialSellingAccount $sellingAccount
320: * @return CommercialArticle
321: */
322: public function setSellingAccount(\CommercialSellingAccount $sellingAccount = null)
323: {
324: $this->sellingAccount = $sellingAccount;
325: return $this;
326: }
327:
328: /**
329: * Get sellingAccount
330: *
331: * @return CommercialSellingAccount
332: */
333: public function getSellingAccount()
334: {
335: return $this->sellingAccount;
336: }
337:
338: /**
339: * Set company
340: *
341: * @param CoreCompanies $company
342: * @return CommercialArticle
343: */
344: public function setCompany(\CoreCompanies $company = null)
345: {
346: $this->company = $company;
347: return $this;
348: }
349:
350: /**
351: * Get company
352: *
353: * @return CoreCompanies
354: */
355: public function getCompany()
356: {
357: return $this->company;
358: }
359:
360: /**
361: * Set parent
362: *
363: * @param CommercialArticle $parent
364: * @return CommercialArticle
365: */
366: public function setParent(\CommercialArticle $parent = null)
367: {
368: $this->parent = $parent;
369: return $this;
370: }
371:
372: /**
373: * Get parent
374: *
375: * @return CommercialArticle
376: */
377: public function getParent()
378: {
379: return $this->parent;
380: }
381:
382: /**
383: * Add categoryLabel
384: *
385: * @param CommercialArticleCategory $categoryLabel
386: * @return CommercialArticle
387: */
388: public function addCommercialArticleCategory(\CommercialArticleCategory $categoryLabel)
389: {
390: $this->categoryLabel[] = $categoryLabel;
391: return $this;
392: }
393:
394: /**
395: * Get categoryLabel
396: *
397: * @return Doctrine\Common\Collections\Collection
398: */
399: public function getCategoryLabel()
400: {
401: return $this->categoryLabel;
402: }
403: }