src/Entity/Market.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MarketRepository;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassMarketRepository::class)]
  7. class Market
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length128)]
  14.     #[Assert\NotBlank]
  15.     private ?string $name;
  16.     public function __construct()
  17.     {
  18.     }
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getName(): ?string
  24.     {
  25.         return $this->name;
  26.     }
  27.     public function setName(?string $name): self
  28.     {
  29.         $this->name $name;
  30.         return $this;
  31.     }
  32.     public function __toString(): string
  33.     {
  34.         return $this->name;
  35.     }
  36. }