<?php
namespace App\Entity;
use App\Repository\HotelBadgeRepository;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: HotelBadgeRepository::class)]
class HotelBadge
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
#[Assert\NotBlank]
private ?string $name = null;
#[ORM\Column(length: 64)]
private ?string $type = null;
#[ORM\Column(nullable: true)]
private ?DateTime $expireAt = null;
#[ORM\ManyToOne(inversedBy: 'badges')]
#[ORM\JoinColumn(nullable: false)]
private ?Hotel $hotel = null;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): static
{
$this->type = $type;
return $this;
}
public function getExpireAt(): ?DateTime
{
return $this->expireAt;
}
public function setExpireAt(?DateTime $expireAt): static
{
$this->expireAt = $expireAt;
return $this;
}
public function getHotel(): ?Hotel
{
return $this->hotel;
}
public function setHotel(?Hotel $hotel): static
{
$this->hotel = $hotel;
return $this;
}
public function __toString(): string
{
return $this->name;
}
}