src\Entity\Evenement.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Entity(repositoryClass\App\Repository\EvenementRepository::class)]
  5. class Evenement
  6. {
  7.     #[ORM\Id]
  8.     #[ORM\GeneratedValue]
  9.     #[ORM\Column(type'integer')]
  10.     private $id;
  11.     #[ORM\JoinColumn(nullablefalse)]
  12.     #[ORM\ManyToOne(targetEntity\App\Entity\Pays::class, inversedBy'evenements')]
  13.     private $pays;
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     #[ORM\ManyToOne(targetEntity\App\Entity\Categorie::class, inversedBy'evenements')]
  16.     private $categorie;
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     #[ORM\ManyToOne(targetEntity\App\Entity\User::class, inversedBy'evenements')]
  19.     private $user;
  20.     #[ORM\Column(type'string'length255)]
  21.     private $nom;
  22.     #[ORM\Column(type'date'nullabletrue)]
  23.     private $date;
  24.     #[ORM\Column(type'time'nullabletrue)]
  25.     private $heure;
  26.     #[ORM\Column(type'string'length255nullabletrue)]
  27.     private $periode;
  28.     #[ORM\Column(type'integer')]
  29.     private $importance;
  30.     #[ORM\Column(type'string'length255nullabletrue)]
  31.     private $precedente;
  32.     #[ORM\Column(type'string'length255nullabletrue)]
  33.     private $prevision;
  34.     #[ORM\Column(type'string'length255nullabletrue)]
  35.     private $actuelle;
  36.     #[ORM\Column(type'string'length255nullabletrue)]
  37.     private $source;
  38.     #[ORM\Column(type'string'length255nullabletrue)]
  39.     private $liensource;
  40.     #[ORM\Column(type'text'nullabletrue)]
  41.     private $commentaire;
  42.     #[ORM\Column(type'datetime')]
  43.     private $created_at;
  44.     #[ORM\Column(type'datetime'nullabletrue)]
  45.     private $updated_at;
  46.     #[ORM\Column(type'boolean')]
  47.     private $status;
  48.     #[ORM\Column(type'string'length255nullabletrue)]
  49.     private $compaprecedent;
  50.     const importances=['Jour férié',1,2,3];
  51.     function getFullImportance(): ?string
  52.     {
  53.         return self::importances[$this->importance];
  54.     }
  55.     public function __construct()
  56.     {
  57.         $this->created_at = new \DateTime();
  58.         $this->status false;
  59.     }
  60.     public function getId(): ?int
  61.     {
  62.         return $this->id;
  63.     }
  64.     public function getPays(): ?Pays
  65.     {
  66.         return $this->pays;
  67.     }
  68.     public function setPays(?Pays $pays): self
  69.     {
  70.         $this->pays $pays;
  71.         return $this;
  72.     }
  73.     public function getCategorie(): ?Categorie
  74.     {
  75.         return $this->categorie;
  76.     }
  77.     public function setCategorie(?Categorie $categorie): self
  78.     {
  79.         $this->categorie $categorie;
  80.         return $this;
  81.     }
  82.     public function getUser(): ?User
  83.     {
  84.         return $this->user;
  85.     }
  86.     public function setUser(?User $user): self
  87.     {
  88.         $this->user $user;
  89.         return $this;
  90.     }
  91.     public function getNom(): ?string
  92.     {
  93.         return $this->nom;
  94.     }
  95.     public function setNom(string $nom): self
  96.     {
  97.         $this->nom $nom;
  98.         return $this;
  99.     }
  100.     public function getDate(): ?\DateTimeInterface
  101.     {
  102.         return $this->date;
  103.     }
  104.     public function setDate(?\DateTimeInterface $date): self
  105.     {
  106.         $this->date $date;
  107.         return $this;
  108.     }
  109.     public function getHeure(): ?\DateTimeInterface
  110.     {
  111.         return $this->heure;
  112.     }
  113.     public function setHeure(?\DateTimeInterface $heure): self
  114.     {
  115.         $this->heure $heure;
  116.         return $this;
  117.     }
  118.     public function getPeriode(): ?string
  119.     {
  120.         return $this->periode;
  121.     }
  122.     public function setPeriode(?string $periode): self
  123.     {
  124.         $this->periode $periode;
  125.         return $this;
  126.     }
  127.     public function getImportance(): ?int
  128.     {
  129.         return $this->importance;
  130.     }
  131.     public function setImportance(int $importance): self
  132.     {
  133.         $this->importance $importance;
  134.         return $this;
  135.     }
  136.     public function getPrecedente(): ?string
  137.     {
  138.         return $this->precedente;
  139.     }
  140.     public function setPrecedente(string $precedente): self
  141.     {
  142.         $this->precedente $precedente;
  143.         return $this;
  144.     }
  145.     public function getPrevision(): ?string
  146.     {
  147.         return $this->prevision;
  148.     }
  149.     public function setPrevision(?string $prevision): self
  150.     {
  151.         $this->prevision $prevision;
  152.         return $this;
  153.     }
  154.     public function getActuelle(): ?string
  155.     {
  156.         return $this->actuelle;
  157.     }
  158.     public function setActuelle(?string $actuelle): self
  159.     {
  160.         $this->actuelle $actuelle;
  161.         return $this;
  162.     }
  163.     public function getSource(): ?string
  164.     {
  165.         return $this->source;
  166.     }
  167.     public function setSource(?string $source): self
  168.     {
  169.         $this->source $source;
  170.         return $this;
  171.     }
  172.     public function getLiensource(): ?string
  173.     {
  174.         return $this->liensource;
  175.     }
  176.     public function setLiensource(?string $liensource): self
  177.     {
  178.         $this->liensource $liensource;
  179.         return $this;
  180.     }
  181.     public function getCommentaire(): ?string
  182.     {
  183.         return $this->commentaire;
  184.     }
  185.     public function setCommentaire(?string $commentaire): self
  186.     {
  187.         $this->commentaire $commentaire;
  188.         return $this;
  189.     }
  190.     public function getCreatedAt(): ?\DateTimeInterface
  191.     {
  192.         return $this->created_at;
  193.     }
  194.     public function setCreatedAt(\DateTimeInterface $created_at): self
  195.     {
  196.         $this->created_at $created_at;
  197.         return $this;
  198.     }
  199.     public function getUpdatedAt(): ?\DateTimeInterface
  200.     {
  201.         return $this->updated_at;
  202.     }
  203.     public function setUpdatedAt(?\DateTimeInterface $updated_at): self
  204.     {
  205.         $this->updated_at $updated_at;
  206.         return $this;
  207.     }
  208.     public function getStatus(): ?bool
  209.     {
  210.         return $this->status;
  211.     }
  212.     public function setStatus(bool $status): self
  213.     {
  214.         $this->status $status;
  215.         return $this;
  216.     }
  217.     public function getCompaprecedent(): ?string
  218.     {
  219.         return $this->compaprecedent;
  220.     }
  221.     public function setCompaprecedent(?string $compaprecedent): self
  222.     {
  223.         $this->compaprecedent $compaprecedent;
  224.         return $this;
  225.     }
  226. }