Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.08 KB | None | 0 0
  1. <?php
  2.  
  3. namespace AppBundle\Entity;
  4.  
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints\Date;
  8.  
  9. /**
  10. * FicheFrais
  11. *
  12. * @ORM\Table(name="fiche_frais")
  13. * @ORM\Entity(repositoryClass="AppBundle\Repository\FicheFraisRepository")
  14. */
  15. class FicheFrais
  16. {
  17.  
  18. /**
  19. * @ORM\Id
  20. * @ORM\GeneratedValue(strategy="AUTO")
  21. * @ORM\SequenceGenerator(sequenceName="id", initialValue=250000)
  22. * @ORM\Column(type="integer")
  23. */
  24. protected $id;
  25.  
  26. /**
  27. * @var User
  28. * @ORM\ManyToOne(targetEntity="AppBundle\Entity\User",cascade={"remove"})
  29. * @ORM\JoinColumn(name="idUtilisateur",referencedColumnName="id",nullable=true,onDelete="CASCADE")
  30. */
  31. private $idUtilisateur;
  32.  
  33. /**
  34. * @var string
  35. *
  36. * @ORM\Column(name="moisAnne", type="string", length=255,nullable=true)
  37. *
  38. */
  39. private $moisAnne;
  40.  
  41. /**
  42. * @var int
  43. * @ORM\Column(name="nbJustificatif",type="integer",length=255)
  44. */
  45. private $nbJustificatif;
  46.  
  47. /**
  48. * @var float
  49. * @ORM\Column(name="montantValide",type="float",length=255)
  50. */
  51. private $montantValide;
  52.  
  53. /**
  54. * @var Date
  55. * @ORM\Column(name="dateModif",type="date",length=255)
  56. */
  57. private $dateModif;
  58.  
  59. /**
  60. * @var Etat
  61. * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Etat",cascade={"remove"})
  62. * @ORM\JoinColumn(name="id_etat",referencedColumnName="id",nullable=true,onDelete="CASCADE")
  63. */
  64. private $id_etat;
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ///exp correspend à ligne frais hors forfait
  71.  
  72.  
  73. /**
  74. * @ORM\OneToMany(targetEntity="AppBundle\Entity\LigneFraisHorsForfait", mappedBy="project", cascade={"persist"},orphanRemoval=true)
  75. */
  76. private $exp;
  77.  
  78. private $mois;
  79. private $anne;
  80. private $MontantTotal;
  81.  
  82.  
  83.  
  84.  
  85. public function __construct()
  86. {
  87. $this->exp = new ArrayCollection();
  88. }
  89.  
  90.  
  91. /**
  92. * Add exp
  93. *
  94. * @param \AppBundle\Entity\LigneFraisHorsForfait $exp
  95. *
  96. * @return FicheFrais
  97. */
  98. public function addExp($exp)
  99. {
  100. $this->exp[] = $exp;
  101. $exp->setProject($this);
  102. return $this;
  103. }
  104.  
  105. /**
  106. * Remove exp
  107. *
  108. * @param \AppBundle\Entity\LigneFraisHorsForfait $exp
  109. */
  110. public function removeExp($exp)
  111. {
  112. $this->exp->removeElement($exp);
  113. }
  114.  
  115. /**
  116. * Get exp
  117. *
  118. * @return \Doctrine\Common\Collections\Collection
  119. */
  120. public function getExp()
  121. {
  122. return $this->exp;
  123.  
  124. }
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. /**
  137. * @return mixed
  138. */
  139. public function getId()
  140. {
  141. return $this->id;
  142. }
  143.  
  144. /**
  145. * @param User $idUtilisateur
  146. */
  147. public function setIdUtilisateur($idUtilisateur)
  148. {
  149. $this->idUtilisateur = $idUtilisateur;
  150. }
  151.  
  152.  
  153.  
  154.  
  155. /**
  156. * @return User
  157. */
  158. public function getIdUtilisateur()
  159. {
  160. return $this->idUtilisateur;
  161. }
  162.  
  163. /**
  164. * @return mixed
  165. */
  166. public function getMoisAnne()
  167. {
  168. return $this->moisAnne;
  169. }
  170.  
  171. /**
  172. * @param mixed $moisAnne
  173. */
  174. public function setMoisAnne($moisAnne)
  175. {
  176. $this->moisAnne = $moisAnne;
  177. }
  178.  
  179. /**
  180. * @return int
  181. */
  182. public function getNbJustificatif()
  183. {
  184. return $this->nbJustificatif;
  185. }
  186.  
  187. /**
  188. * @param int $nbJustificatif
  189. */
  190. public function setNbJustificatif($nbJustificatif)
  191. {
  192. $this->nbJustificatif = $nbJustificatif;
  193. }
  194.  
  195. /**
  196. * @return float
  197. */
  198. public function getMontantValide()
  199. {
  200. return $this->montantValide;
  201. }
  202.  
  203. /**
  204. * @param float $montantValide
  205. */
  206. public function setMontantValide($montantValide)
  207. {
  208. $this->montantValide = $montantValide;
  209. }
  210.  
  211. /**
  212. * @return Date
  213. */
  214. public function getDateModif()
  215. {
  216. return $this->dateModif;
  217. }
  218.  
  219. /**
  220. * @param Date $dateModif
  221. */
  222. public function setDateModif($dateModif)
  223. {
  224. $this->dateModif = $dateModif;
  225. }
  226.  
  227. /**
  228. * @return Etat
  229. */
  230. public function getIdEtat()
  231. {
  232. return $this->id_etat;
  233. }
  234.  
  235. /**
  236. * @param User $id_etat
  237. */
  238. public function setIdEtat($id_etat)
  239. {
  240. $this->id_etat = $id_etat;
  241. }
  242.  
  243.  
  244. //spilte form
  245. //these objects are uesed but never saved in DataBase
  246.  
  247. /**
  248. * @return mixed
  249. */
  250. public function getMois()
  251. {
  252. return $this->mois;
  253. }
  254.  
  255. /**
  256. * @param mixed $mois
  257. */
  258. public function setMois($mois)
  259. {
  260. $this->mois = $mois;
  261. }
  262.  
  263. /**
  264. * @return mixed
  265. */
  266. public function getAnne()
  267. {
  268. return $this->anne;
  269. }
  270.  
  271. /**
  272. * @param mixed $anne
  273. */
  274. public function setAnne($anne)
  275. {
  276. $this->anne = $anne;
  277. }
  278.  
  279. /**
  280. * @return mixed
  281. */
  282. public function getMontantTotal()
  283. {
  284. return $this->MontantTotal;
  285. }
  286.  
  287. /**
  288. * @param mixed $MontantTotal
  289. */
  290. public function setMontantTotal($MontantTotal)
  291. {
  292. $this->MontantTotal = $MontantTotal;
  293. }
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302. //Méthodess
  303.  
  304. public function __toString()
  305. {
  306. return Project::class;
  307. }
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement