<?phpnamespace App\Entity;use App\Repository\CampagneCoucheRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Table(name="campagneCouche") * @ORM\Entity(repositoryClass=CampagneCoucheRepository::class) */class CampagneCouche{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(name="DateDebut",type="datetime") */ private $DateDebut; /** * @ORM\Column(name="DateFin",type="datetime") */ private $DateFin; /** * @ORM\Column(type="integer") */ private $Progression; /** * @ORM\Column(type="integer") */ private $Tentative; /** * @ORM\Column(type="integer", nullable=true) */ private $Objectif; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $couche; /** * @ORM\Column(name="DateCreation",type="datetime") */ private $DateCreation; /** * Initialiser l'entity */ public function __construct() { // initialiser la date de creation de la couche if ($this->getDateCreation() === null) { $this->setDateCreation(new \DateTime('now')); } } /** * @ORM\ManyToOne(targetEntity=Compagne::class, inversedBy="campagneCouches") * @ORM\JoinColumn(name="IdCompagne", referencedColumnName="id") */ private $compagne; public function getId(): ?int { return $this->id; } public function getDateDebut(): ?\DateTimeInterface { return $this->DateDebut; } public function setDateDebut(\DateTimeInterface $DateDebut): self { $this->DateDebut = $DateDebut; return $this; } public function getDateFin(): ?\DateTimeInterface { return $this->DateFin; } public function setDateFin(\DateTimeInterface $DateFin): self { $this->DateFin = $DateFin; return $this; } public function getProgression(): ?int { return $this->Progression; } public function setProgression(int $Progression): self { $this->Progression = $Progression; return $this; } public function getTentative(): ?int { return $this->Tentative; } public function setTentative(int $Tentative): self { $this->Tentative = $Tentative; return $this; } public function getObjectif(): ?int { return $this->Objectif; } public function setObjectif(?int $Objectif): self { $this->Objectif = $Objectif; return $this; } public function getCouche(): ?string { return $this->couche; } public function setCouche(?string $couche): self { $this->couche = $couche; return $this; } public function getDateCreation(): ?\DateTimeInterface { return $this->DateCreation; } public function setDateCreation(\DateTimeInterface $DateCreation): self { $this->DateCreation = $DateCreation; return $this; } public function getCompagne(): ?Compagne { return $this->compagne; } public function setCompagne(?Compagne $compagne): self { $this->compagne = $compagne; return $this; }}