1 | <?php |
||
21 | class Brand |
||
22 | { |
||
23 | /** |
||
24 | * @var int |
||
25 | * |
||
26 | * @ORM\Column(type="integer") |
||
27 | * @ORM\Id |
||
28 | * @ORM\GeneratedValue(strategy="AUTO") |
||
29 | */ |
||
30 | protected $id; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | * |
||
35 | * @ORM\Column(type="string", length=100) |
||
36 | */ |
||
37 | protected $name; |
||
38 | |||
39 | /** |
||
40 | * @var ArrayCollection |
||
41 | * |
||
42 | * @ORM\OneToMany(targetEntity="Product", mappedBy="brand") |
||
43 | */ |
||
44 | protected $products; |
||
45 | |||
46 | public function __construct() |
||
50 | |||
51 | /** |
||
52 | * @return int|null |
||
53 | */ |
||
54 | public function getId() |
||
58 | |||
59 | /** |
||
60 | * @return string|null |
||
61 | */ |
||
62 | public function getName() |
||
66 | |||
67 | public function setName(string $name) |
||
71 | |||
72 | /** |
||
73 | * @return ArrayCollection |
||
74 | */ |
||
75 | public function getProducts() |
||
79 | } |
||
80 |