feat: dedicated logos per country for accommodation bookings
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Entity\BlameableEntity;
|
||||
use App\Entity\BlameableEntityInterface;
|
||||
use App\Entity\TimestampableEntity;
|
||||
use App\Entity\TimestampableEntityInterface;
|
||||
use App\Enum\Groups\AccommodationCountry;
|
||||
use App\Repository\Groups\AccommodationRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
@@ -64,6 +65,10 @@ class Accommodation implements BlameableEntityInterface, TimestampableEntityInte
|
||||
#[Assert\Choice(choices: ['EUR', 'CHF'], message: 'invalid')]
|
||||
private ?string $currency = 'EUR';
|
||||
|
||||
#[ORM\Column(length: 2, enumType: AccommodationCountry::class)]
|
||||
#[Assert\NotNull(message: 'required')]
|
||||
private ?AccommodationCountry $country = AccommodationCountry::Germany;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->accommodationPrices = new ArrayCollection();
|
||||
@@ -171,6 +176,18 @@ class Accommodation implements BlameableEntityInterface, TimestampableEntityInte
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCountry(): ?AccommodationCountry
|
||||
{
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
public function setCountry(AccommodationCountry $country): self
|
||||
{
|
||||
$this->country = $country;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, BoardService>
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user