<?phpdeclare(strict_types=1);namespace App\Shop\Doctrine\Entity;use App\Program\Doctrine\Entity\Profile;use App\Shop\Doctrine\Entity\Filter\Filter;use App\Shop\Doctrine\Repository\ShopRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping\Column;use Doctrine\ORM\Mapping\Entity;use Doctrine\ORM\Mapping\GeneratedValue;use Doctrine\ORM\Mapping\Id;use Doctrine\ORM\Mapping\JoinTable;use Doctrine\ORM\Mapping\ManyToMany;use Doctrine\ORM\Mapping\OneToMany;use Doctrine\ORM\Mapping\Table;use Symfony\Component\Validator\Constraints\Count as CountAssert;use Symfony\Component\Validator\Constraints\NotNull;use Symfony\Component\Validator\Constraints\Valid;#[Entity(repositoryClass: ShopRepository::class)]#[Table(name: '`shop`')]class Shop{ #[Id] #[Column(type: 'integer')] #[GeneratedValue] private ?int $id = null; /** * @var Collection<array-key, Profile> */ #[ManyToMany(targetEntity: Profile::class)] #[JoinTable(name: '`shop_profiles`')] #[CountAssert(min: 1)] private Collection $profiles; #[Column(type: 'price_valuation')] #[Valid] #[NotNull] private PriceValuation $priceValuation; /** * @var Collection<array-key, Filter> */ #[OneToMany(mappedBy: 'shop', targetEntity: Filter::class, cascade: ['persist'])] private Collection $filters; private int $numberOfProducts = 0; public function __construct() { $this->profiles = new ArrayCollection(); $this->filters = new ArrayCollection(); } public function getId(): ?int { return $this->id; } /** * @return Collection<array-key, Profile> */ public function getProfiles(): Collection { return $this->profiles; } public function getPriceValuation(): PriceValuation { return $this->priceValuation; } public function setPriceValuation(PriceValuation $priceValuation): void { $this->priceValuation = $priceValuation; } /** * @return Collection<array-key, Filter> */ public function getFilters(): Collection { return $this->filters; } public function getNumberOfProducts(): int { return $this->numberOfProducts; } public function setNumberOfProducts(int $numberOfProducts): void { $this->numberOfProducts = $numberOfProducts; }}