src/Flexy/ShopBundle/Entity/Shipping/CashOnDelivery.php line 14

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Shipping;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Flexy\ShopBundle\Entity\Customer\Customer;
  5. use App\Flexy\ShopBundle\Entity\Payment\BankBookItem;
  6. use App\Repository\Flexy\ShopBundle\Entity\Shipping\CashOnDeliveryRepository;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassCashOnDeliveryRepository::class)]
  10. #[ApiResource]
  11. class CashOnDelivery
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $createdAt null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $description null;
  21.     #[ORM\Column]
  22.     private ?float $amount null;
  23.     #[ORM\ManyToOne(inversedBy'cashOnDeliveries',cascade:["persist"])]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?Shipment $shipment null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $image null;
  28.     #[ORM\Column(nullabletrue)]
  29.     private ?bool $isValid null;
  30.     #[ORM\ManyToOne(inversedBy'cashOnDeliveries')]
  31.     private ?CashBox $cashBox null;
  32.     #[ORM\Column(nullabletrue)]
  33.     private ?bool $isCollected null;
  34.     #[ORM\Column(length255)]
  35.     private ?string $paymentMethod null;
  36.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  37.     private ?\DateTimeInterface $collectedAt null;
  38.     #[ORM\ManyToOne(inversedBy'cashOnDeliveries')]
  39.     private ?Customer $customer null;
  40.     #[ORM\Column(nullabletrue)]
  41.     private ?bool $isReceivedByCustomer null;
  42.     #[ORM\ManyToOne(inversedBy'cashOnDeliveries')]
  43.     private ?BankBookItem $bankBookItem null;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getCreatedAt(): ?\DateTimeInterface
  49.     {
  50.         return $this->createdAt;
  51.     }
  52.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  53.     {
  54.         $this->createdAt $createdAt;
  55.         return $this;
  56.     }
  57.     public function getDescription(): ?string
  58.     {
  59.         return $this->description;
  60.     }
  61.     public function setDescription(?string $description): self
  62.     {
  63.         $this->description $description;
  64.         return $this;
  65.     }
  66.     public function getAmount(): ?float
  67.     {
  68.         return $this->amount;
  69.     }
  70.     public function setAmount(float $amount): self
  71.     {
  72.         $this->amount $amount;
  73.         return $this;
  74.     }
  75.     public function getShipment(): ?Shipment
  76.     {
  77.         return $this->shipment;
  78.     }
  79.     public function setShipment(?Shipment $shipment): self
  80.     {
  81.         $this->shipment $shipment;
  82.         return $this;
  83.     }
  84.     public function getImage(): ?string
  85.     {
  86.         return $this->image;
  87.     }
  88.     public function setImage(?string $image): self
  89.     {
  90.         $this->image $image;
  91.         return $this;
  92.     }
  93.     public function isIsValid(): ?bool
  94.     {
  95.         return $this->isValid;
  96.     }
  97.     public function setIsValid(?bool $isValid): self
  98.     {
  99.         $this->isValid $isValid;
  100.         return $this;
  101.     }
  102.     public function getCashBox(): ?CashBox
  103.     {
  104.         return $this->cashBox;
  105.     }
  106.     public function setCashBox(?CashBox $cashBox): self
  107.     {
  108.         $this->cashBox $cashBox;
  109.         return $this;
  110.     }
  111.     public function isIsCollected(): ?bool
  112.     {
  113.         return $this->isCollected;
  114.     }
  115.     public function setIsCollected(?bool $isCollected): self
  116.     {
  117.         $this->isCollected $isCollected;
  118.         return $this;
  119.     }
  120.     public function getPaymentMethod(): ?string
  121.     {
  122.         return $this->paymentMethod;
  123.     }
  124.     public function setPaymentMethod(string $paymentMethod): self
  125.     {
  126.         $this->paymentMethod $paymentMethod;
  127.         return $this;
  128.     }
  129.     public function getCollectedAt(): ?\DateTimeInterface
  130.     {
  131.         return $this->collectedAt;
  132.     }
  133.     public function setCollectedAt(?\DateTimeInterface $collectedAt): self
  134.     {
  135.         $this->collectedAt $collectedAt;
  136.         return $this;
  137.     }
  138.     public function getCustomer(): ?Customer
  139.     {
  140.         return $this->customer;
  141.     }
  142.     public function setCustomer(?Customer $customer): self
  143.     {
  144.         $this->customer $customer;
  145.         return $this;
  146.     }
  147.     public function isIsReceivedByCustomer(): ?bool
  148.     {
  149.         return $this->isReceivedByCustomer;
  150.     }
  151.     public function setIsReceivedByCustomer(?bool $isReceivedByCustomer): self
  152.     {
  153.         $this->isReceivedByCustomer $isReceivedByCustomer;
  154.         return $this;
  155.     }
  156.     public function getBankBookItem(): ?BankBookItem
  157.     {
  158.         return $this->bankBookItem;
  159.     }
  160.     public function setBankBookItem(?BankBookItem $bankBookItem): self
  161.     {
  162.         $this->bankBookItem $bankBookItem;
  163.         return $this;
  164.     }
  165. }