src/Entity/Payement.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PayementRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassPayementRepository::class)]
  6. class Payement
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\Column(length15)]
  13.     private ?string $status null;
  14.     #[ORM\Column]
  15.     private ?\DateTimeImmutable $createdAt null;
  16.     #[ORM\ManyToOne(inversedBy'payements')]
  17.     private ?Devis $devis null;
  18.     #[ORM\OneToOne(mappedBy'payement'cascade: ['persist''remove'])]
  19.     private ?Facture $facture null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getStatus(): ?string
  25.     {
  26.         return $this->status;
  27.     }
  28.     public function setStatus(string $status): static
  29.     {
  30.         $this->status $status;
  31.         return $this;
  32.     }
  33.     public function getCreatedAt(): ?\DateTimeImmutable
  34.     {
  35.         return $this->createdAt;
  36.     }
  37.     public function setCreatedAt(\DateTimeImmutable $createdAt): static
  38.     {
  39.         $this->createdAt $createdAt;
  40.         return $this;
  41.     }
  42.     public function getDevis(): ?Devis
  43.     {
  44.         return $this->devis;
  45.     }
  46.     public function setDevis(?Devis $devis): static
  47.     {
  48.         $this->devis $devis;
  49.         return $this;
  50.     }
  51.     public function getFacture(): ?Facture
  52.     {
  53.         return $this->facture;
  54.     }
  55.     public function setFacture(Facture $facture): static
  56.     {
  57.         // set the owning side of the relation if necessary
  58.         if ($facture->getPayement() !== $this) {
  59.             $facture->setPayement($this);
  60.         }
  61.         $this->facture $facture;
  62.         return $this;
  63.     }
  64. }