1 | <?php |
||
19 | class Product |
||
20 | { |
||
21 | /** |
||
22 | * @ORM\Column(type="integer") |
||
23 | * @ORM\Id |
||
24 | * @ORM\GeneratedValue(strategy="AUTO") |
||
25 | */ |
||
26 | protected $id; |
||
27 | |||
28 | /** |
||
29 | * @ORM\Column(type="string", length=100) |
||
30 | */ |
||
31 | protected $name; |
||
32 | |||
33 | /** |
||
34 | * @ORM\Column(type="decimal", scale=2) |
||
35 | */ |
||
36 | protected $price; |
||
37 | |||
38 | /** |
||
39 | * @ORM\Column(type="text") |
||
40 | */ |
||
41 | protected $description; |
||
42 | |||
43 | /** |
||
44 | * @var Brand |
||
45 | * |
||
46 | * @ORM\ManyToOne(targetEntity="Brand", inversedBy="products") |
||
47 | * @ORM\JoinColumn(name="brand_id", referencedColumnName="id") |
||
48 | */ |
||
49 | protected $brand; |
||
50 | |||
51 | public function getBrand(): Brand |
||
55 | |||
56 | public function getDescription(): string |
||
60 | |||
61 | public function getId(): int |
||
65 | |||
66 | public function getName(): string |
||
70 | |||
71 | public function setName(string $name) |
||
75 | |||
76 | public function getPrice(): float |
||
80 | |||
81 | public function setPrice(float $price) |
||
85 | } |
||
86 |