src/Entity/CampagneCouche.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CampagneCoucheRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table(name="campagneCouche")
  7. * @ORM\Entity(repositoryClass=CampagneCoucheRepository::class)
  8. */
  9. class CampagneCouche
  10. {
  11. /**
  12. * @ORM\Id()
  13. * @ORM\GeneratedValue()
  14. * @ORM\Column(type="integer")
  15. */
  16. private $id;
  17. /**
  18. * @ORM\Column(name="DateDebut",type="datetime")
  19. */
  20. private $DateDebut;
  21. /**
  22. * @ORM\Column(name="DateFin",type="datetime")
  23. */
  24. private $DateFin;
  25. /**
  26. * @ORM\Column(type="integer")
  27. */
  28. private $Progression;
  29. /**
  30. * @ORM\Column(type="integer")
  31. */
  32. private $Tentative;
  33. /**
  34. * @ORM\Column(type="integer", nullable=true)
  35. */
  36. private $Objectif;
  37. /**
  38. * @ORM\Column(type="string", length=255, nullable=true)
  39. */
  40. private $couche;
  41. /**
  42. * @ORM\Column(name="DateCreation",type="datetime")
  43. */
  44. private $DateCreation;
  45. /**
  46. * Initialiser l'entity
  47. */
  48. public function __construct()
  49. {
  50. // initialiser la date de creation de la couche
  51. if ($this->getDateCreation() === null) {
  52. $this->setDateCreation(new \DateTime('now'));
  53. }
  54. }
  55. /**
  56. * @ORM\ManyToOne(targetEntity=Compagne::class, inversedBy="campagneCouches")
  57. * @ORM\JoinColumn(name="IdCompagne", referencedColumnName="id")
  58. */
  59. private $compagne;
  60. public function getId(): ?int
  61. {
  62. return $this->id;
  63. }
  64. public function getDateDebut(): ?\DateTimeInterface
  65. {
  66. return $this->DateDebut;
  67. }
  68. public function setDateDebut(\DateTimeInterface $DateDebut): self
  69. {
  70. $this->DateDebut = $DateDebut;
  71. return $this;
  72. }
  73. public function getDateFin(): ?\DateTimeInterface
  74. {
  75. return $this->DateFin;
  76. }
  77. public function setDateFin(\DateTimeInterface $DateFin): self
  78. {
  79. $this->DateFin = $DateFin;
  80. return $this;
  81. }
  82. public function getProgression(): ?int
  83. {
  84. return $this->Progression;
  85. }
  86. public function setProgression(int $Progression): self
  87. {
  88. $this->Progression = $Progression;
  89. return $this;
  90. }
  91. public function getTentative(): ?int
  92. {
  93. return $this->Tentative;
  94. }
  95. public function setTentative(int $Tentative): self
  96. {
  97. $this->Tentative = $Tentative;
  98. return $this;
  99. }
  100. public function getObjectif(): ?int
  101. {
  102. return $this->Objectif;
  103. }
  104. public function setObjectif(?int $Objectif): self
  105. {
  106. $this->Objectif = $Objectif;
  107. return $this;
  108. }
  109. public function getCouche(): ?string
  110. {
  111. return $this->couche;
  112. }
  113. public function setCouche(?string $couche): self
  114. {
  115. $this->couche = $couche;
  116. return $this;
  117. }
  118. public function getDateCreation(): ?\DateTimeInterface
  119. {
  120. return $this->DateCreation;
  121. }
  122. public function setDateCreation(\DateTimeInterface $DateCreation): self
  123. {
  124. $this->DateCreation = $DateCreation;
  125. return $this;
  126. }
  127. public function getCompagne(): ?Compagne
  128. {
  129. return $this->compagne;
  130. }
  131. public function setCompagne(?Compagne $compagne): self
  132. {
  133. $this->compagne = $compagne;
  134. return $this;
  135. }
  136. }