<?phpnamespace App\Entity\System;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\System\GroupRepository") * * @ORM\Table(name="ps_group") */class Group{ public const GROUP_ID_GENERAL = 1; public const GROUP_ID_WHOLESALER = 2; public const GROUP_ID_EMPLOYEE = 3; /** * @var int * * @ORM\Id * * @ORM\GeneratedValue(strategy="AUTO") * * @ORM\Column(type="integer", name="id_group") */ private $id; /** * @var string * * @ORM\Column(type="string", length=32) */ private $name; /** * @var Customer[]|ArrayCollection * * @ORM\OneToMany(targetEntity="Customer", mappedBy="group") */ private $customers; public function __construct() { $this->customers = new ArrayCollection(); } /** * @return int */ public function getId(): int { return $this->id; } /** * @param int $id * * @return Group */ public function setId(int $id): self { $this->id = $id; return $this; } /** * @return string */ public function getName(): string { return $this->name; } /** * @param string $name * * @return Group */ public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Customer[]|ArrayCollection */ public function getCustomers(): array { return $this->customers; } /** * @param Customer[]|ArrayCollection $customers * * @return Group */ public function setCustomers(array $customers): self { $this->customers = $customers; return $this; }}