2018-03-15 16:04:00 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
|
|
* @ORM\Entity(repositoryClass="App\Repository\ProductCategoryRepository")
|
|
|
|
*/
|
|
|
|
class ProductCategory {
|
|
|
|
/**
|
|
|
|
* @ORM\Id
|
|
|
|
* @ORM\GeneratedValue
|
|
|
|
* @ORM\Column(type="integer")
|
|
|
|
*/
|
|
|
|
private $id;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Column(type="string", length=100)
|
|
|
|
*/
|
|
|
|
private $name;
|
|
|
|
|
|
|
|
/**
|
2018-03-15 16:18:06 +01:00
|
|
|
* @ORM\OneToMany(targetEntity="Product", mappedBy="category")
|
2018-03-15 16:04:00 +01:00
|
|
|
*/
|
|
|
|
private $products;
|
|
|
|
|
2018-03-15 16:18:06 +01:00
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getProducts() {
|
|
|
|
return $this->products;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $products
|
|
|
|
*/
|
|
|
|
public function setProducts( $products ) {
|
|
|
|
$this->products = $products;
|
|
|
|
}
|
|
|
|
|
2018-03-15 16:04:00 +01:00
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getId() {
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $id
|
|
|
|
*/
|
|
|
|
public function setId( $id ) {
|
|
|
|
$this->id = $id;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getName() {
|
|
|
|
return $this->name;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $name
|
|
|
|
*/
|
|
|
|
public function setName( $name ) {
|
|
|
|
$this->name = $name;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|