<?php
namespace App\Entity\Imports;
use App\Entity\Utilisateur\Utilisateur;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use App\Annotations\SecuredEntity;
/**
* Champ
*
* @ORM\Table("import__champ")
* @ORM\Entity(repositoryClass="App\Repository\Imports\ChampRepository")
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
* @SecuredEntity (name="Champ", group="IMPORTS")
*/
class Champ
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="champImport")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\Column(name="obligatoire", type="boolean", nullable=true)
*/
protected $obligatoire;
/**
* @ORM\Column(name="champ_recherche", type="boolean", nullable=true)
*/
protected $champDeRecherche;
/**
* @ORM\Column(name="externe", type="boolean", nullable=true)
*/
protected $externe;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
*/
private $libelle;
/**
* @ORM\Column(name="entite_liaison", type="string", length=255, nullable=true)
*/
private $entiteLiaison;
/**
* @ORM\Column(name="champ_liaison", type="string", length=255, nullable=true)
*/
private $champLiaison;
/**
* @ORM\Column(name="type_donnees", type="string", length=255, nullable=true)
*/
private $typeDonnees;
/**
* @ORM\Column(name="attribut", type="string", length=255, nullable=true)
*/
private $attribut;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="date_supression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="dateMaj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Imports\Entite", cascade={"persist"}, inversedBy="champ")
*/
private $entite;
public function __construct()
{
$this->date = new Datetime();
$this->obligatoire = false;
$this->champDeRecherche = false;
}
public function getId(): int
{
return $this->id;
}
public function setLibelle(?string $libelle): Champ
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setDate(?DateTime $date): Champ
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setDateSuppression(?DateTime $dateSuppression): Champ
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setDateMaj(?string $dateMaj): Champ
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?string
{
return $this->dateMaj;
}
public function setUtilisateur(?Utilisateur $utilisateur): Champ
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function __toString() {
return $this->libelle;
}
public function setEntite(?Entite $entite): Champ
{
$this->entite = $entite;
return $this;
}
public function getEntite(): ?Entite
{
return $this->entite;
}
public function setObligatoire(?bool $obligatoire): Champ
{
$this->obligatoire = $obligatoire;
return $this;
}
public function getObligatoire(): ?bool
{
return $this->obligatoire;
}
public function setChampDeRecherche(?bool $champDeRecherche): Champ
{
$this->champDeRecherche = $champDeRecherche;
return $this;
}
public function getChampDeRecherche(): ?bool
{
return $this->champDeRecherche;
}
public function setAttribut(?string $attribut): Champ
{
$this->attribut = $attribut;
return $this;
}
public function getAttribut(): ?string
{
return $this->attribut;
}
public function setEntiteLiaison(?string $entiteLiaison): Champ
{
$this->entiteLiaison = $entiteLiaison;
return $this;
}
public function getEntiteLiaison(): ?string
{
return $this->entiteLiaison;
}
public function setChampLiaison(?string $champLiaison): Champ
{
$this->champLiaison = $champLiaison;
return $this;
}
public function getChampLiaison(): ?string
{
return $this->champLiaison;
}
public function setTypeDonnees(?string $typeDonnees): Champ
{
$this->typeDonnees = $typeDonnees;
return $this;
}
public function getTypeDonnees(): ?string
{
return $this->typeDonnees;
}
public function setExterne(?bool $externe): Champ
{
$this->externe = $externe;
return $this;
}
public function getExterne(): ?bool
{
return $this->externe;
}
}