| 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 | /** |
||
| 52 | * @return Brand |
||
| 53 | */ |
||
| 54 | public function getBrand() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | public function getDescription() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return int |
||
| 69 | */ |
||
| 70 | public function getId() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | public function getName() |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return float |
||
| 85 | */ |
||
| 86 | public function getPrice() |
||
| 90 | } |
||
| 91 |