src/Entity/Compta.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ComptaRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=ComptaRepository::class)
  7. */
  8. class Compta
  9. {
  10. const STATUT_OPEN = "open";
  11. const STATUT_PART = "part";
  12. const STATUT_COMPLETE = "complete";
  13. const STATUT_PROMESSE = "promesse";
  14. const STATUT_CANCELLED = "annulé";
  15. const TYPE_RESA = "resas";
  16. const TYPE_COST = "Coût (libellé)";
  17. const TYPE_TRANSPORT_ALLER = "transport aller";
  18. const TYPE_TRANSPORT_RETOUR = "transport retour";
  19. const TYPE_PAIEMENT = "paiement";
  20. const TYPE_PAIEMENT_CB = "paiement CB";
  21. const TYPE_REDUCTION = "Réduction";
  22. /**
  23. * @ORM\Id
  24. * @ORM\GeneratedValue
  25. * @ORM\Column(type="integer")
  26. */
  27. private $id;
  28. /**
  29. * @ORM\ManyToOne(targetEntity=Inscription::class, inversedBy="comptas",cascade={"persist"})
  30. * @ORM\JoinColumn(nullable=true)
  31. */
  32. private $inscription;
  33. /**
  34. * @ORM\Column(type="string", length=255)
  35. */
  36. private $type;
  37. /**
  38. * @ORM\Column(type="string", length=255, nullable = true)
  39. */
  40. private $complement;
  41. /**
  42. * @ORM\Column(type="float")
  43. */
  44. private $valeur;
  45. /**
  46. * @ORM\Column(type="string", length=255, nullable = true)
  47. */
  48. private $reference;
  49. /**
  50. * @ORM\Column(type="datetime", nullable= true)
  51. */
  52. private $bookingDate;
  53. /**
  54. * @ORM\ManyToOne(targetEntity=Commande::class, inversedBy="compta")
  55. */
  56. private $commande;
  57. /**
  58. * @ORM\Column(type="string", length=40, nullable=true)
  59. */
  60. private $statut;
  61. /**
  62. * @ORM\Column(type="datetime")
  63. */
  64. private $creationDate;
  65. /**
  66. * @ORM\ManyToOne(targetEntity=Contact::class, inversedBy="comptas")
  67. * @ORM\JoinColumn(nullable=false)
  68. */
  69. private $contact;
  70. /**
  71. * @ORM\Column(type="string", length=30, nullable=true)
  72. */
  73. private $legacyId;
  74. /**
  75. * @ORM\ManyToOne(targetEntity=ComptaType::class, inversedBy="comptas")
  76. */
  77. private $comptaType;
  78. public function getId(): ?int
  79. {
  80. return $this->id;
  81. }
  82. public function getInscription(): ?Inscription
  83. {
  84. return $this->inscription;
  85. }
  86. public function setInscription(?Inscription $inscription): self
  87. {
  88. $this->inscription = $inscription;
  89. return $this;
  90. }
  91. public function getType(): ?string
  92. {
  93. return $this->type;
  94. }
  95. public function setType(string $type): self
  96. {
  97. $this->type = $type;
  98. return $this;
  99. }
  100. public function getComplement(): ?string
  101. {
  102. return $this->complement;
  103. }
  104. public function setComplement(?string $complement): self
  105. {
  106. $this->complement = $complement;
  107. return $this;
  108. }
  109. public function getValeur(): ?float
  110. {
  111. return $this->valeur;
  112. }
  113. public function setValeur(float $valeur): self
  114. {
  115. $this->valeur = $valeur;
  116. return $this;
  117. }
  118. public function getReference(): ?string
  119. {
  120. return $this->reference;
  121. }
  122. public function setReference(?string $reference): self
  123. {
  124. $this->reference = $reference;
  125. return $this;
  126. }
  127. public function getBookingDate(): ?\DateTimeInterface
  128. {
  129. return $this->bookingDate;
  130. }
  131. public function setBookingDate(\DateTimeInterface $paiementDate): self
  132. {
  133. $this->bookingDate = $paiementDate;
  134. return $this;
  135. }
  136. public function getCommande(): ?Commande
  137. {
  138. return $this->commande;
  139. }
  140. public function setCommande(?Commande $commande): self
  141. {
  142. $this->commande = $commande;
  143. return $this;
  144. }
  145. public function getStatut(): ?string
  146. {
  147. return $this->statut;
  148. }
  149. public function setStatut(?string $statut): self
  150. {
  151. $this->statut = $statut;
  152. return $this;
  153. }
  154. public function getCreationDate(): ?\DateTimeInterface
  155. {
  156. return $this->creationDate;
  157. }
  158. public function setCreationDate(\DateTimeInterface $creationDate): self
  159. {
  160. $this->creationDate = $creationDate;
  161. return $this;
  162. }
  163. public function __construct(){
  164. $this->creationDate = new \Datetime();
  165. $this->bookingDate = new \DateTime();
  166. }
  167. public function getContact(): ?Contact
  168. {
  169. return $this->contact;
  170. }
  171. public function setContact(?Contact $contact): self
  172. {
  173. $this->contact = $contact;
  174. return $this;
  175. }
  176. public function getLegacyId(): ?string
  177. {
  178. return $this->legacyId;
  179. }
  180. public function setLegacyId(?string $legacyId): self
  181. {
  182. $this->legacyId = $legacyId;
  183. return $this;
  184. }
  185. public function getComptaType(): ?ComptaType
  186. {
  187. return $this->comptaType;
  188. }
  189. public function setComptaType(?ComptaType $comptaType): self
  190. {
  191. $this->comptaType = $comptaType;
  192. return $this;
  193. }
  194. }