src/Entity/Tickets.php line 17
<?phpnamespace App\Entity;use App\Entity\Trait\MainTranslationTrait;use App\Entity\Translation\TicketsTranslation;use App\Repository\TicketsRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;use Gedmo\Translatable\Translatable;#[ORM\Table(name: 'tickets')]#[ORM\Entity(repositoryClass: TicketsRepository::class)]#[Gedmo\TranslationEntity(class: TicketsTranslation::class)]class Tickets implements Translatable{use MainTranslationTrait;const TRANSLATION_ENTITY = TicketsTranslation::class;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: 'integer', nullable: true)]private ?int $ticketTypeId = null;#[ORM\Column(type: 'string', nullable: true)]#[Gedmo\Translatable]private ?string $title = null;#[ORM\Column(type: 'string', nullable: true)]#[Gedmo\Translatable]private ? string $description = null;#[ORM\Column(type: 'float', nullable: true)]private ?float $price = null;#[ORM\Column(type: 'float', nullable: true)]private ?float $discountedPrice = null;#[ORM\Column(type: 'boolean', nullable: true)]private ?bool $isFree = null;#[ORM\Column(type: 'boolean', nullable: true, options: ['default' => true])]private ?bool $isActive = true;#[ORM\Column(type: 'boolean', nullable: true, options: ['default' => false])]private ?bool $isCharity = false;#[ORM\Column(type: 'boolean', nullable: true)]private ?bool $showHomePage = null;#[ORM\OneToMany(mappedBy: 'ticket', targetEntity: Basket::class, cascade: ['persist', 'remove'])]private Collection $basket;#[ORM\OneToMany(mappedBy: 'ticket', targetEntity: OrderItem::class, cascade: ['persist', 'remove'])]private Collection $orderItem;#[ORM\Column(type: 'string',length: 160, nullable: true)]#[Gedmo\Translatable]private ?string $metaKeywords = null;#[ORM\Column(type: 'string',length: 160, nullable: true)]#[Gedmo\Translatable]private ?string $metaDescription = null;#[ORM\Column(type: 'integer', nullable: true)]private ?int $position = null;public function __construct(){$this->basket = new ArrayCollection();$this->orderItem = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function __toString(): string{return $this->title ?? "";}public function getTicketTypeId(): ?int{return $this->ticketTypeId;}public function setTicketTypeId(?int $ticketTypeId): void{$this->ticketTypeId = $ticketTypeId;}public function getTitle(): ?string{return $this->title;}public function setTitle(?string $title): static{$this->title = $title;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): static{$this->description = $description;return $this;}public function getPrice(): ?float{return $this->price;}public function setPrice(?float $price): static{$this->price = $price;return $this;}public function getDiscountedPrice(): ?float{return $this->discountedPrice;}public function setDiscountedPrice(?float $discountedPrice): static{$this->discountedPrice = $discountedPrice;return $this;}public function getIsFree(): ?bool{return $this->isFree;}public function setIsFree(?bool $isFree): void{$this->isFree = $isFree;}public function isShowHomePage(): ?bool{return $this->showHomePage;}public function setShowHomePage(?bool $showHomePage): static{$this->showHomePage = $showHomePage;return $this;}/*** @return Collection<int, Basket>*/public function getBasket(): Collection{return $this->basket;}public function addBasket(Basket $basket): static{if (!$this->basket->contains($basket)) {$this->basket->add($basket);$basket->setTicket($this);}return $this;}public function removeBasket(Basket $basket): static{if ($this->basket->removeElement($basket)) {// set the owning side to null (unless already changed)if ($basket->getTicket() === $this) {$basket->setTicket(null);}}return $this;}public function getIsActive(): ?bool{return $this->isActive;}public function setIsActive(?bool $isActive): void{$this->isActive = $isActive;}public function isIsActive(): ?bool{return $this->isActive;}/*** @return Collection<int, OrderItem>*/public function getOrderItem(): Collection{return $this->orderItem;}public function addOrderItem(OrderItem $orderItem): static{if (!$this->orderItem->contains($orderItem)) {$this->orderItem->add($orderItem);$orderItem->setTicket($this);}return $this;}public function removeOrderItem(OrderItem $orderItem): static{if ($this->orderItem->removeElement($orderItem)) {// set the owning side to null (unless already changed)if ($orderItem->getTicket() === $this) {$orderItem->setTicket(null);}}return $this;}public function getMetaKeywords(): ?string{return $this->metaKeywords;}public function setMetaKeywords(?string $metaKeywords): void{$this->metaKeywords = $metaKeywords;}public function getMetaDescription(): ?string{return $this->metaDescription;}public function setMetaDescription(?string $metaDescription): void{$this->metaDescription = $metaDescription;}public function getIsCharity(): ?bool{return $this->isCharity;}public function setIsCharity(?bool $isCharity): void{$this->isCharity = $isCharity;}public function getPosition(): ?int{return $this->position;}public function setPosition(?int $position): void{$this->position = $position;}}