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