<?php
namespace App\Entity\Calendar;
use App\Annotation\SiteAware;
use App\Entity\AbstractBase;
use App\Entity\Interfaces\PublishedInterface;
use App\Entity\Interfaces\SiteInterface;
use App\Entity\MiniAbstractBase;
use App\Entity\Traits\NameTrait;
use App\Entity\Traits\PublishedTrait;
use App\Entity\Traits\SiteTrait;
use App\Repository\Calendar\CalendarEventCategoryRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Table(name="vulco_calendar_event_category", indexes={@ORM\Index(name="calendar_event_category_site_idx", columns={"site"})})
* @ORM\Entity(repositoryClass=CalendarEventCategoryRepository::class)
* @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
* @SiteAware(siteFieldName="site")
*/
class CalendarEventCategory extends AbstractBase implements SiteInterface, PublishedInterface
{
use NameTrait;
use PublishedTrait;
use SiteTrait;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private string $name;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private string $color;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private string $textColor;
public function getColor(): string
{
return $this->color;
}
public function setColor(string $color): CalendarEventCategory
{
$this->color = $color;
return $this;
}
public function getTextColor(): string
{
return $this->textColor;
}
public function setTextColor(string $textColor): CalendarEventCategory
{
$this->textColor = $textColor;
return $this;
}
public function __construct()
{
}
public function __toString(): string
{
return $this->id ? $this->getName() : MiniAbstractBase::DEFAULT_EMPTY_STRING;
}
}