src/Entity/HotelBadge.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\HotelBadgeRepository;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. #[ORM\Entity(repositoryClassHotelBadgeRepository::class)]
  8. class HotelBadge
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     #[Assert\NotBlank]
  16.     private ?string $name null;
  17.     #[ORM\Column(length64)]
  18.     private ?string $type null;
  19.     #[ORM\Column(nullabletrue)]
  20.     private ?DateTime $expireAt null;
  21.     #[ORM\ManyToOne(inversedBy'badges')]
  22.     #[ORM\JoinColumn(nullablefalse)]
  23.     private ?Hotel $hotel null;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getName(): ?string
  29.     {
  30.         return $this->name;
  31.     }
  32.     public function setName(string $name): static
  33.     {
  34.         $this->name $name;
  35.         return $this;
  36.     }
  37.     public function getType(): ?string
  38.     {
  39.         return $this->type;
  40.     }
  41.     public function setType(string $type): static
  42.     {
  43.         $this->type $type;
  44.         return $this;
  45.     }
  46.     public function getExpireAt(): ?DateTime
  47.     {
  48.         return $this->expireAt;
  49.     }
  50.     public function setExpireAt(?DateTime $expireAt): static
  51.     {
  52.         $this->expireAt $expireAt;
  53.         return $this;
  54.     }
  55.     public function getHotel(): ?Hotel
  56.     {
  57.         return $this->hotel;
  58.     }
  59.     public function setHotel(?Hotel $hotel): static
  60.     {
  61.         $this->hotel $hotel;
  62.         return $this;
  63.     }
  64.     public function __toString(): string
  65.     {
  66.         return $this->name;
  67.     }
  68. }