src/Entity/UserRegion.php line 11
<?phpnamespace App\Entity;use App\Repository\UserRegionRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Gedmo\Timestampable\Traits\TimestampableEntity;#[ORM\Entity(repositoryClass: UserRegionRepository::class)]class UserRegion{use TimestampableEntity;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne(inversedBy: 'userRegions')]private ?User $user = null;#[ORM\ManyToOne(inversedBy: 'userRegions')]private ?Region $region = null;#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]private ?\DateTimeInterface $startDate = null;public function getId(): ?int{return $this->id;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): static{$this->user = $user;return $this;}public function getRegion(): ?Region{return $this->region;}public function setRegion(?Region $region): static{$this->region = $region;return $this;}public function getStartDate(): ?\DateTimeInterface{return $this->startDate;}public function setStartDate(?\DateTimeInterface $startDate): static{$this->startDate = $startDate;return $this;}// to stringpublic function __toString(){return $this->getRegion() ? $this->getRegion()->getName() : '';}}