<?phpnamespace App\Entity;use App\Repository\FactureServiceRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: FactureServiceRepository::class)]class FactureService{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $dateCreation = null; #[ORM\Column(length: 255, nullable: true)] private ?string $numero = null; #[ORM\Column(nullable: true)] private ?float $montantTotal = null; #[ORM\Column(length: 255, nullable: true)] private ?string $status = null; #[ORM\ManyToOne(inversedBy: 'factureServices')] private ?Client $client = null; /** * Propriété non persistée utilisée uniquement pour le formulaire */ private $services; #[ORM\OneToMany(mappedBy: 'serviceFacture', targetEntity: ServiceFactureLigne::class, cascade: ['persist'])] private Collection $serviceFactureLignes; #[ORM\OneToMany(mappedBy: 'factureService', targetEntity: Recette::class)] private Collection $recettes; #[ORM\Column(length: 255, nullable: true)] private ?string $TypePaiement = null; #[ORM\ManyToOne(inversedBy: 'factureServices')] private ?Boutique $boutique = null; public function __construct() { $this->serviceFactureLignes = new ArrayCollection(); $this->dateCreation = new \DateTime(); $this->recettes = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getDateCreation(): ?\DateTimeInterface { return $this->dateCreation; } public function setDateCreation(\DateTimeInterface $dateCreation): static { $this->dateCreation = $dateCreation; return $this; } public function getNumero(): ?string { return $this->numero; } public function setNumero(?string $numero): static { $this->numero = $numero; return $this; } public function getMontantTotal(): ?float { return $this->montantTotal; } public function setMontantTotal(?float $montantTotal): static { $this->montantTotal = $montantTotal; return $this; } public function getStatus(): ?string { return $this->status; } public function setStatus(?string $status): static { $this->status = $status; return $this; } public function getClient(): ?Client { return $this->client; } public function setClient(?Client $client): static { $this->client = $client; return $this; } /** * @return Collection<int, ServiceFactureLigne> */ public function getServiceFactureLignes(): Collection { return $this->serviceFactureLignes; } public function addServiceFactureLigne(ServiceFactureLigne $serviceFactureLigne): static { if (!$this->serviceFactureLignes->contains($serviceFactureLigne)) { $this->serviceFactureLignes->add($serviceFactureLigne); $serviceFactureLigne->setServiceFacture($this); } return $this; } public function removeServiceFactureLigne(ServiceFactureLigne $serviceFactureLigne): static { if ($this->serviceFactureLignes->removeElement($serviceFactureLigne)) { // set the owning side to null (unless already changed) if ($serviceFactureLigne->getServiceFacture() === $this) { $serviceFactureLigne->setServiceFacture(null); } } return $this; } public function getServices() { return $this->services; } public function setServices($services): self { $this->services = $services; return $this; } /** * @return Collection<int, Recette> */ public function getRecettes(): Collection { return $this->recettes; } public function addRecette(Recette $recette): static { if (!$this->recettes->contains($recette)) { $this->recettes->add($recette); $recette->setFactureService($this); } return $this; } public function removeRecette(Recette $recette): static { if ($this->recettes->removeElement($recette)) { // set the owning side to null (unless already changed) if ($recette->getFactureService() === $this) { $recette->setFactureService(null); } } return $this; } public function getTypePaiement(): ?string { return $this->TypePaiement; } public function setTypePaiement(?string $TypePaiement): static { $this->TypePaiement = $TypePaiement; return $this; } public function getBoutique(): ?Boutique { return $this->boutique; } public function setBoutique(?Boutique $boutique): static { $this->boutique = $boutique; return $this; }}