src/Entity/Basket.php line 11
<?phpnamespace App\Entity;use App\Repository\BasketRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Table(name: 'basket')]#[ORM\Entity(repositoryClass: BasketRepository::class)]class Basket{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: 'string', nullable: true)]private ?string $guestUser;#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'basket')]private ?object $user;#[ORM\ManyToOne(targetEntity: Tickets::class, fetch: 'EAGER', inversedBy: 'basket')]private ?object $ticket;#[ORM\ManyToOne(targetEntity: Order::class, inversedBy: 'basket')]private ?object $order = null;#[ORM\Column(type: 'integer', nullable: true)]private ?int $quantity = null;#[ORM\Column(type: 'integer', nullable: true)]private ?int $status = 1;#[ORM\Column(type: 'string', nullable: true)]private ?float $discountedPrice = null;#[ORM\Column(type: 'float', nullable: true)]private ?float $price = null;#[ORM\Column(type: 'float', nullable: true)]private ?float $discountPercent = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $createAt = null;#[ORM\Column(type: 'date', nullable: true)]private mixed $date = null;public function getId(): ?int{return $this->id;}public function getGuestUser(): ?string{return $this->guestUser;}public function setGuestUser(?string $guestUser): static{$this->guestUser = $guestUser;return $this;}public function getQuantity(): ?int{return $this->quantity;}public function setQuantity(int $quantity): static{$this->quantity = $quantity;return $this;}public function getStatus(): ?int{return $this->status;}public function setStatus(?int $status): void{$this->status = $status;}public function getDiscountedPrice(): ?float{return $this->discountedPrice;}public function setDiscountedPrice(float $discountedPrice): static{$this->discountedPrice = $discountedPrice;return $this;}public function getPrice(): ?float{return $this->price;}public function setPrice(float $price): static{$this->price = $price;return $this;}public function getDiscountPercent(): ?float{return $this->discountPercent;}public function setDiscountPercent(float $discountPercent): static{$this->discountPercent = $discountPercent;return $this;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): static{$this->user = $user;return $this;}public function getTicket(): ?Tickets{return $this->ticket;}public function setTicket(?Tickets $ticket): static{$this->ticket = $ticket;return $this;}public function getCreateAt(): ?\DateTimeInterface{return $this->createAt;}public function setCreateAt(?\DateTimeInterface $createAt): static{$this->createAt = $createAt;return $this;}public function getDate(): mixed{return $this->date;}public function setDate(mixed $date): void{$this->date = $date;}public function getOrder(): ?Order{return $this->order;}public function setOrder(?Order $order): static{// Ensure that only an instance of Order or null is assignedif ($order !== null && !$order instanceof Order) {throw new \InvalidArgumentException('The provided argument must be of type Order or null.');}$this->order = $order;return $this;}}