<?phpnamespace App\Entity;use App\Repository\ProjetBailleurRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity(repositoryClass: ProjetBailleurRepository::class)]class ProjetBailleur{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] #[Groups(["projetBailleur:read"])] private ?int $id = null; #[ORM\Column(type: Types::DATE_MUTABLE)] #[Assert\NotBlank(message:"Veuillez remplir ce champ")] #[Groups(["projetBailleur:read"])] private ?\DateTimeInterface $createdAt = null; #[ORM\ManyToOne(inversedBy: 'projetBailleurs')] #[Groups(["projetBailleur:read"])] private ?Projet $projet = null; #[ORM\ManyToOne(inversedBy: 'projetBailleurs')] #[Assert\NotBlank(message:"Veuillez remplir ce champ")] #[Groups(["projetBailleur:read"])] private ?Bailleur $bailleur = null; #[ORM\Column] #[Groups(["projetBailleur:read"])] #[Assert\NotBlank(message:"Veuillez remplir ce champ")] private ?float $montant = null; #[ORM\Column] #[Groups(["projetBailleur:read"])] #[Assert\NotBlank(message:"Veuillez remplir ce champ")] private ?float $contrubution = null; #[ORM\ManyToOne(inversedBy: 'projetBailleurs')] #[Assert\NotBlank(message:"Veuillez remplir ce champ")] #[Groups(["projetBailleur:read"])] private ?ModeFinance $modeFinance = null; public function __construct() { $this->createdAt = new \DateTimeImmutable(); $this->montant = 0; $this->contrubution = 0; } public function getId(): ?int { return $this->id; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getProjet(): ?Projet { return $this->projet; } public function setProjet(?Projet $projet): self { $this->projet = $projet; return $this; } public function getBailleur(): ?Bailleur { return $this->bailleur; } public function setBailleur(?Bailleur $bailleur): self { $this->bailleur = $bailleur; $this->bailleur->setIsDeleted(false); return $this; } public function getMontant(): ?float { return $this->montant; } public function setMontant(?float $montant): self { $this->montant = $montant; return $this; } public function getContrubution(): ?float { return $this->contrubution; } public function setContrubution(?float $contrubution): self { $this->contrubution = $contrubution; return $this; } public function getModeFinance(): ?ModeFinance { return $this->modeFinance; } public function setModeFinance(?ModeFinance $modeFinance): self { $this->modeFinance = $modeFinance; $this->modeFinance->setIsDeleted(false); return $this; }}