<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Table;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\ManyToOne;
#[Entity]
#[Table(name: "paiement_recette")]
class PaiementRecette
{
#[Id]
#[GeneratedValue]
#[Column(type: "integer")]
private int $id;
#[ManyToOne(targetEntity: Recette::class, inversedBy: "paiements")]
#[ORM\JoinColumn(nullable: false)]
private Recette $recette;
#[ManyToOne(targetEntity: TypePaiement::class)]
#[ORM\JoinColumn(nullable: false)]
private TypePaiement $typePaiement;
#[Column(type: "decimal", scale: 2)]
private float $sommePayee;
public function getId(): int
{
return $this->id;
}
public function getRecette(): Recette
{
return $this->recette;
}
public function setRecette(Recette $recette): void
{
$this->recette = $recette;
}
public function getTypePaiement(): TypePaiement
{
return $this->typePaiement;
}
public function setTypePaiement(TypePaiement $typePaiement): void
{
$this->typePaiement = $typePaiement;
}
public function getSommePayee(): float
{
return $this->sommePayee;
}
public function setSommePayee(float $sommePayee): void
{
$this->sommePayee = $sommePayee;
}
}