src/Flexy/ShopBundle/Entity/Order/TicketsCustomer.php line 12

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Order;
  3. use App\Flexy\ShopBundle\Entity\Customer\Customer;
  4. use App\Repository\Flexy\ShopBundle\Entity\Order\TicketsCustomerRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use \App\Flexy\ShopBundle\Entity\Order\Order;
  8. #[ORM\Entity(repositoryClassTicketsCustomerRepository::class)]
  9. class TicketsCustomer
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $code null;
  17.     #[ORM\Column(nullabletrue)]
  18.     private ?float $amount null;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  20.     private ?\DateTimeInterface $expiration_date null;
  21.     #[ORM\ManyToOne(inversedBy'ticketsCustomers')]
  22.     private ?Customer $user_id null;
  23.     #[ORM\Column(nullabletrue)]
  24.     private ?bool $is_used null;
  25.     #[ORM\ManyToOne(inversedBy'ticketsCustomers')]
  26.     private ?Order $parent_order_ticket null;
  27.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  28.     private ?\DateTimeInterface $date_of_use null;
  29.     
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getCode(): ?string
  35.     {
  36.         return $this->code;
  37.     }
  38.     public function setCode(?string $code): static
  39.     {
  40.         $this->code $code;
  41.         return $this;
  42.     }
  43.     public function getAmount(): ?float
  44.     {
  45.         return $this->amount;
  46.     }
  47.     public function setAmount(?float $amount): static
  48.     {
  49.         $this->amount $amount;
  50.         return $this;
  51.     }
  52.     public function getExpirationDate(): ?\DateTimeInterface
  53.     {
  54.         return $this->expiration_date;
  55.     }
  56.     public function setExpirationDate(?\DateTimeInterface $expiration_date): static
  57.     {
  58.         $this->expiration_date $expiration_date;
  59.         return $this;
  60.     }
  61.     public function getUserId(): ?Customer
  62.     {
  63.         return $this->user_id;
  64.     }
  65.     public function setUserId(?Customer $user_id): static
  66.     {
  67.         $this->user_id $user_id;
  68.         return $this;
  69.     }
  70.     public function isIsUsed(): ?bool
  71.     {
  72.         return $this->is_used;
  73.     }
  74.     public function setIsUsed(?bool $is_used): static
  75.     {
  76.         $this->is_used $is_used;
  77.         return $this;
  78.     }
  79.     public function getParentOrderTicket(): ?Order
  80.     {
  81.         return $this->parent_order_ticket;
  82.     }
  83.     public function setParentOrderTicket(?Order $parent_order_ticket): static
  84.     {
  85.         $this->parent_order_ticket $parent_order_ticket;
  86.         return $this;
  87.     }
  88.     public function getDateOfUse(): ?\DateTimeInterface
  89.     {
  90.         return $this->date_of_use;
  91.     }
  92.     public function setDateOfUse(?\DateTimeInterface $date_of_use): static
  93.     {
  94.         $this->date_of_use $date_of_use;
  95.         return $this;
  96.     }
  97. }