src/Entity/Payment.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PaymentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Entity\SalesReturn;
  6. #[ORM\Entity(repositoryClassPaymentRepository::class)]
  7. class Payment extends BaseEntity
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\ManyToOne(targetEntityCustomer::class, inversedBy'payments')]
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     private $customer;
  16.     #[ORM\Column(type'date')]
  17.     private $paymentDate;
  18.     #[ORM\Column(type'decimal'precision10scale2)]
  19.     private $amount;
  20.     #[ORM\Column(type'string'length255)]
  21.     private $paymentStatus;
  22.     #[ORM\Column(type'date'nullabletrue)]
  23.     private $dueDate;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private $description;
  26.     #[ORM\ManyToOne(targetEntityPaymentMethod::class, inversedBy'payments')]
  27.     #[ORM\JoinColumn(nullablefalse)]
  28.     private $paymentMethod;
  29.     #[ORM\ManyToOne(targetEntitySales::class, inversedBy'payments')]
  30.     #[ORM\JoinColumn(nullablefalse)]
  31.     private $sales;
  32.     #[ORM\ManyToOne(inversedBy'payments')]
  33.     private ?Invoice $invoice null;
  34.     #[ORM\ManyToOne(targetEntitySalesReturn::class)]
  35.     #[ORM\JoinColumn(nullabletrueonDelete'SET NULL')]
  36.     private ?SalesReturn $salesReturn null;
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getCustomer(): ?Customer
  42.     {
  43.         return $this->customer;
  44.     }
  45.     public function setCustomer(?Customer $customer): self
  46.     {
  47.         $this->customer $customer;
  48.         return $this;
  49.     }
  50.     public function getPaymentDate(): ?\DateTimeInterface
  51.     {
  52.         return $this->paymentDate;
  53.     }
  54.     public function setPaymentDate(\DateTimeInterface $paymentDate): self
  55.     {
  56.         $this->paymentDate $paymentDate;
  57.         return $this;
  58.     }
  59.     public function getAmount(): ?float
  60.     {
  61.         return $this->amount;
  62.     }
  63.     public function setAmount(float $amount): self
  64.     {
  65.         $this->amount $amount;
  66.         return $this;
  67.     }
  68.     public function getPaymentStatus(): ?string
  69.     {
  70.         return $this->paymentStatus;
  71.     }
  72.     public function setPaymentStatus(string $paymentStatus): self
  73.     {
  74.         $this->paymentStatus $paymentStatus;
  75.         return $this;
  76.     }
  77.     public function getDueDate(): ?\DateTimeInterface
  78.     {
  79.         return $this->dueDate;
  80.     }
  81.     public function setDueDate(?\DateTimeInterface $dueDate): self
  82.     {
  83.         $this->dueDate $dueDate;
  84.         return $this;
  85.     }
  86.     public function getDescription(): ?string
  87.     {
  88.         return $this->description;
  89.     }
  90.     public function setDescription(?string $description): self
  91.     {
  92.         $this->description $description;
  93.         return $this;
  94.     }
  95.     public function getPaymentMethod(): ?PaymentMethod
  96.     {
  97.         return $this->paymentMethod;
  98.     }
  99.     public function setPaymentMethod(?PaymentMethod $paymentMethod): self
  100.     {
  101.         $this->paymentMethod $paymentMethod;
  102.         return $this;
  103.     }
  104.     public function getSales(): ?Sales
  105.     {
  106.         return $this->sales;
  107.     }
  108.     public function setSales(?Sales $sales): self
  109.     {
  110.         $this->sales $sales;
  111.         return $this;
  112.     }
  113.     public function getInvoice(): ?Invoice
  114.     {
  115.         return $this->invoice;
  116.     }
  117.     public function setInvoice(?Invoice $invoice): static
  118.     {
  119.         $this->invoice $invoice;
  120.         return $this;
  121.     }
  122.     public function getSalesReturn(): ?SalesReturn
  123.     {
  124.         return $this->salesReturn;
  125.     }
  126.     public function setSalesReturn(?SalesReturn $salesReturn): self
  127.     {
  128.         $this->salesReturn $salesReturn;
  129.         return $this;
  130.     }
  131. }