Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace AppBundle\Entity;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\Validator\Constraints\Date;
- /**
- * FicheFrais
- *
- * @ORM\Table(name="fiche_frais")
- * @ORM\Entity(repositoryClass="AppBundle\Repository\FicheFraisRepository")
- */
- class FicheFrais
- {
- /**
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- * @ORM\SequenceGenerator(sequenceName="id", initialValue=250000)
- * @ORM\Column(type="integer")
- */
- protected $id;
- /**
- * @var User
- * @ORM\ManyToOne(targetEntity="AppBundle\Entity\User",cascade={"remove"})
- * @ORM\JoinColumn(name="idUtilisateur",referencedColumnName="id",nullable=true,onDelete="CASCADE")
- */
- private $idUtilisateur;
- /**
- * @var string
- *
- * @ORM\Column(name="moisAnne", type="string", length=255,nullable=true)
- *
- */
- private $moisAnne;
- /**
- * @var int
- * @ORM\Column(name="nbJustificatif",type="integer",length=255)
- */
- private $nbJustificatif;
- /**
- * @var float
- * @ORM\Column(name="montantValide",type="float",length=255)
- */
- private $montantValide;
- /**
- * @var Date
- * @ORM\Column(name="dateModif",type="date",length=255)
- */
- private $dateModif;
- /**
- * @var Etat
- * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Etat",cascade={"remove"})
- * @ORM\JoinColumn(name="id_etat",referencedColumnName="id",nullable=true,onDelete="CASCADE")
- */
- private $id_etat;
- ///exp correspend à ligne frais hors forfait
- /**
- * @ORM\OneToMany(targetEntity="AppBundle\Entity\LigneFraisHorsForfait", mappedBy="project", cascade={"persist"},orphanRemoval=true)
- */
- private $exp;
- private $mois;
- private $anne;
- private $MontantTotal;
- public function __construct()
- {
- $this->exp = new ArrayCollection();
- }
- /**
- * Add exp
- *
- * @param \AppBundle\Entity\LigneFraisHorsForfait $exp
- *
- * @return FicheFrais
- */
- public function addExp($exp)
- {
- $this->exp[] = $exp;
- $exp->setProject($this);
- return $this;
- }
- /**
- * Remove exp
- *
- * @param \AppBundle\Entity\LigneFraisHorsForfait $exp
- */
- public function removeExp($exp)
- {
- $this->exp->removeElement($exp);
- }
- /**
- * Get exp
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getExp()
- {
- return $this->exp;
- }
- /**
- * @return mixed
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * @param User $idUtilisateur
- */
- public function setIdUtilisateur($idUtilisateur)
- {
- $this->idUtilisateur = $idUtilisateur;
- }
- /**
- * @return User
- */
- public function getIdUtilisateur()
- {
- return $this->idUtilisateur;
- }
- /**
- * @return mixed
- */
- public function getMoisAnne()
- {
- return $this->moisAnne;
- }
- /**
- * @param mixed $moisAnne
- */
- public function setMoisAnne($moisAnne)
- {
- $this->moisAnne = $moisAnne;
- }
- /**
- * @return int
- */
- public function getNbJustificatif()
- {
- return $this->nbJustificatif;
- }
- /**
- * @param int $nbJustificatif
- */
- public function setNbJustificatif($nbJustificatif)
- {
- $this->nbJustificatif = $nbJustificatif;
- }
- /**
- * @return float
- */
- public function getMontantValide()
- {
- return $this->montantValide;
- }
- /**
- * @param float $montantValide
- */
- public function setMontantValide($montantValide)
- {
- $this->montantValide = $montantValide;
- }
- /**
- * @return Date
- */
- public function getDateModif()
- {
- return $this->dateModif;
- }
- /**
- * @param Date $dateModif
- */
- public function setDateModif($dateModif)
- {
- $this->dateModif = $dateModif;
- }
- /**
- * @return Etat
- */
- public function getIdEtat()
- {
- return $this->id_etat;
- }
- /**
- * @param User $id_etat
- */
- public function setIdEtat($id_etat)
- {
- $this->id_etat = $id_etat;
- }
- //spilte form
- //these objects are uesed but never saved in DataBase
- /**
- * @return mixed
- */
- public function getMois()
- {
- return $this->mois;
- }
- /**
- * @param mixed $mois
- */
- public function setMois($mois)
- {
- $this->mois = $mois;
- }
- /**
- * @return mixed
- */
- public function getAnne()
- {
- return $this->anne;
- }
- /**
- * @param mixed $anne
- */
- public function setAnne($anne)
- {
- $this->anne = $anne;
- }
- /**
- * @return mixed
- */
- public function getMontantTotal()
- {
- return $this->MontantTotal;
- }
- /**
- * @param mixed $MontantTotal
- */
- public function setMontantTotal($MontantTotal)
- {
- $this->MontantTotal = $MontantTotal;
- }
- //Méthodess
- public function __toString()
- {
- return Project::class;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement