src/Modules/TicketCart/Entity/TicketOrderTicket.php line 16
<?phpnamespace App\Modules\TicketCart\Entity;use App\Admin\Modules\Voucher\Entity\VoucherPackage;use App\Admin\Modules\Voucher\Entity\VoucherPackageVoucher;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;/*** @ORM\Table(name="ticket_order_ticket", indexes={@ORM\Index(columns={"name"}), @ORM\Index(columns={"price"}), @ORM\Index(columns={"total_price"})})* @ORM\Entity*/class TicketOrderTicket{/*** @var int** @ORM\Id* @ORM\Column(type="bigint", options={"unsigned"=true}))* @ORM\GeneratedValue(strategy="AUTO")*/private $id;/*** @var \App\Modules\TicketCart\Entity\TicketOrder** @ORM\ManyToOne(targetEntity="App\Modules\TicketCart\Entity\TicketOrder", inversedBy="tickets")* @ORM\JoinColumns({* @ORM\JoinColumn(name="id_ticket_order", referencedColumnName="id", nullable=false, onDelete="CASCADE")* })*/private $order;/*** @var \App\Admin\Modules\Voucher\Entity\VoucherPackage** @ORM\ManyToOne(targetEntity="App\Admin\Modules\Voucher\Entity\VoucherPackage")* @ORM\JoinColumns({* @ORM\JoinColumn(name="id_voucher_package", referencedColumnName="id", nullable=true, onDelete="SET NULL")* })*/private $package;/*** @var string** @ORM\Column(name="name", type="string", length=255, nullable=true, options={"collation"="utf8_unicode_ci"})*/private $name;/*** @var string** @ORM\Column(name="price", type="decimal", precision=14, scale=2, nullable=false)*/private $price;/*** @var int** @ORM\Column(name="quantity", type="integer", nullable=false)*/private $quantity;/*** @var string** @ORM\Column(name="total_price", type="decimal", precision=14, scale=2, nullable=false)*/private $totalPrice;/*** @var string** @ORM\Column(name="data", type="text", nullable=true)*/private $data;/*** @var \App\Admin\Modules\Voucher\Entity\VoucherPackageVoucher** @ORM\ManyToMany(targetEntity="App\Admin\Modules\Voucher\Entity\VoucherPackageVoucher", inversedBy="ticket")* @ORM\JoinTable(name="ticket_order_ticket_package_voucher",* joinColumns={@ORM\JoinColumn(name="id_ticket_order_ticket", referencedColumnName="id", onDelete="CASCADE")},* inverseJoinColumns={@ORM\JoinColumn(name="id_voucher_package_voucher", referencedColumnName="id", onDelete="CASCADE")}* )**/private $vouchers;public function __construct(){$this->vouchers = new ArrayCollection();}public function getId(): ?string{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(?string $name): self{$this->name = $name;return $this;}public function getPrice(): ?string{return $this->price;}public function setPrice(string $price): self{$this->price = $price;return $this;}public function getQuantity(): ?int{return $this->quantity;}public function setQuantity(int $quantity): self{$this->quantity = $quantity;return $this;}public function getTotalPrice(): ?string{return $this->totalPrice;}public function setTotalPrice(string $totalPrice): self{$this->totalPrice = $totalPrice;return $this;}public function getOrder(): ?TicketOrder{return $this->order;}public function setOrder(?TicketOrder $order): self{$this->order = $order;return $this;}public function getPackage(): ?VoucherPackage{return $this->package;}public function setPackage(?VoucherPackage $package): self{$this->package = $package;return $this;}/*** @return Collection<int, VoucherPackageVoucher>*/public function getVouchers(): Collection{return $this->vouchers;}public function addVoucher(VoucherPackageVoucher $voucher): self{if (!$this->vouchers->contains($voucher)) {$this->vouchers->add($voucher);}return $this;}public function removeVoucher(VoucherPackageVoucher $voucher): self{$this->vouchers->removeElement($voucher);return $this;}public function getData(): ?string{return $this->data;}public function setData(?string $data): self{$this->data = $data;return $this;}}