57 lines
777 B
PHP
57 lines
777 B
PHP
|
<?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;
|
||
|
|
||
|
/**
|
||
|
* @ORM\OneToMany(targetEntity="Product", inversedBy="category")
|
||
|
*/
|
||
|
private $products;
|
||
|
|
||
|
/**
|
||
|
* @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;
|
||
|
}
|
||
|
|
||
|
}
|