| 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 setBrand(Brand $brand) |
||
| 60 | |||
| 61 | public function getDescription(): string |
||
| 65 | |||
| 66 | public function setDescription(string $description) |
||
| 70 | |||
| 71 | public function getId(): int |
||
| 75 | |||
| 76 | public function getName(): string |
||
| 80 | |||
| 81 | public function setName(string $name) |
||
| 85 | |||
| 86 | public function getPrice(): float |
||
| 90 | |||
| 91 | public function setPrice(float $price) |
||
| 95 | } |
||
| 96 |