<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\EvenementRepository")
*/
class Evenement
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Pays", inversedBy="evenements")
* @ORM\JoinColumn(nullable=false)
*/
private $pays;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Categorie", inversedBy="evenements")
* @ORM\JoinColumn(nullable=false)
*/
private $categorie;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="evenements")
* @ORM\JoinColumn(nullable=false)
*/
private $user;
/**
* @ORM\Column(type="string", length=255)
*/
private $nom;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $date;
/**
* @ORM\Column(type="time",nullable=true)
*/
private $heure;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $periode;
/**
* @ORM\Column(type="integer")
*/
private $importance;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $precedente;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $prevision;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $actuelle;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $source;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $liensource;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $commentaire;
/**
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updated_at;
/**
* @ORM\Column(type="boolean")
*/
private $status;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $compaprecedent;
const importances=['Jour férié',1,2,3];
function getFullImportance(): ?string
{
return self::importances[$this->importance];
}
public function __construct()
{
$this->created_at = new \DateTime();
$this->status = false;
}
public function getId(): ?int
{
return $this->id;
}
public function getPays(): ?Pays
{
return $this->pays;
}
public function setPays(?Pays $pays): self
{
$this->pays = $pays;
return $this;
}
public function getCategorie(): ?Categorie
{
return $this->categorie;
}
public function setCategorie(?Categorie $categorie): self
{
$this->categorie = $categorie;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getHeure(): ?\DateTimeInterface
{
return $this->heure;
}
public function setHeure(?\DateTimeInterface $heure): self
{
$this->heure = $heure;
return $this;
}
public function getPeriode(): ?string
{
return $this->periode;
}
public function setPeriode(?string $periode): self
{
$this->periode = $periode;
return $this;
}
public function getImportance(): ?int
{
return $this->importance;
}
public function setImportance(int $importance): self
{
$this->importance = $importance;
return $this;
}
public function getPrecedente(): ?string
{
return $this->precedente;
}
public function setPrecedente(string $precedente): self
{
$this->precedente = $precedente;
return $this;
}
public function getPrevision(): ?string
{
return $this->prevision;
}
public function setPrevision(?string $prevision): self
{
$this->prevision = $prevision;
return $this;
}
public function getActuelle(): ?string
{
return $this->actuelle;
}
public function setActuelle(?string $actuelle): self
{
$this->actuelle = $actuelle;
return $this;
}
public function getSource(): ?string
{
return $this->source;
}
public function setSource(?string $source): self
{
$this->source = $source;
return $this;
}
public function getLiensource(): ?string
{
return $this->liensource;
}
public function setLiensource(?string $liensource): self
{
$this->liensource = $liensource;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(?string $commentaire): self
{
$this->commentaire = $commentaire;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updated_at;
}
public function setUpdatedAt(?\DateTimeInterface $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
public function getStatus(): ?bool
{
return $this->status;
}
public function setStatus(bool $status): self
{
$this->status = $status;
return $this;
}
public function getCompaprecedent(): ?string
{
return $this->compaprecedent;
}
public function setCompaprecedent(?string $compaprecedent): self
{
$this->compaprecedent = $compaprecedent;
return $this;
}
}