src/Entity/Imports/Champ.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Imports;
  3. use App\Entity\Utilisateur\Utilisateur;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use App\Annotations\SecuredEntity;
  9. /**
  10.  * Champ
  11.  *
  12.  * @ORM\Table("import__champ")
  13.  * @ORM\Entity(repositoryClass="App\Repository\Imports\ChampRepository")
  14.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  15.  * @SecuredEntity (name="Champ", group="IMPORTS")
  16.  */
  17. class Champ
  18. {
  19.     /**
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     private $id;
  25.     
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="champImport")
  28.      * @ORM\JoinColumn(nullable=true)
  29.      */
  30.     private $utilisateur;
  31.     
  32.     /**
  33.      * @ORM\Column(name="obligatoire", type="boolean", nullable=true)
  34.      */
  35.     protected $obligatoire;  
  36.       
  37.     /**
  38.      * @ORM\Column(name="champ_recherche", type="boolean", nullable=true)
  39.      */
  40.     protected $champDeRecherche;    
  41.     
  42.     /**
  43.      * @ORM\Column(name="externe", type="boolean", nullable=true)
  44.      */
  45.     protected $externe;
  46.     /**
  47.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  48.      */
  49.     private $libelle;
  50.     
  51.     /**
  52.      * @ORM\Column(name="entite_liaison", type="string", length=255, nullable=true)
  53.      */
  54.     private $entiteLiaison;
  55.     
  56.     /**
  57.      * @ORM\Column(name="champ_liaison", type="string", length=255, nullable=true)
  58.      */
  59.     private $champLiaison;
  60.     
  61.     /**
  62.      * @ORM\Column(name="type_donnees", type="string", length=255, nullable=true)
  63.      */
  64.     private $typeDonnees;
  65.     
  66.     /**
  67.      * @ORM\Column(name="attribut", type="string", length=255, nullable=true)
  68.      */
  69.     private $attribut;
  70.     /**
  71.      * @ORM\Column(name="date", type="datetime", nullable=true)
  72.      */
  73.     private $date;
  74.     /**
  75.      * @ORM\Column(name="date_supression", type="datetime", nullable=true)
  76.      */
  77.     private $dateSuppression;
  78.     /**
  79.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  80.      * @Gedmo\Timestampable(on="update")
  81.      */
  82.     private $dateMaj;
  83.     
  84.     /**
  85.      * @ORM\ManyToOne(targetEntity="App\Entity\Imports\Entite", cascade={"persist"}, inversedBy="champ")
  86.      */
  87.     private $entite;    
  88.     public function __construct()
  89.     {
  90.         $this->date = new Datetime();
  91.         $this->obligatoire false;
  92.         $this->champDeRecherche false;
  93.     }
  94.     public function getId(): int
  95.     {
  96.         return $this->id;
  97.     }
  98.     public function setLibelle(?string $libelle): Champ
  99.     {
  100.         $this->libelle $libelle;
  101.         return $this;
  102.     }
  103.     public function getLibelle(): ?string
  104.     {
  105.         return $this->libelle;
  106.     }
  107.     public function setDate(?DateTime $date): Champ
  108.     {
  109.         $this->date $date;
  110.         return $this;
  111.     }
  112.     public function getDate(): ?DateTime
  113.     {
  114.         return $this->date;
  115.     }
  116.     public function setDateSuppression(?DateTime $dateSuppression): Champ
  117.     {
  118.         $this->dateSuppression $dateSuppression;
  119.         return $this;
  120.     }
  121.     public function getDateSuppression(): ?DateTime
  122.     {
  123.         return $this->dateSuppression;
  124.     }
  125.     public function setDateMaj(?string $dateMaj): Champ
  126.     {
  127.         $this->dateMaj $dateMaj;
  128.         return $this;
  129.     }
  130.     public function getDateMaj(): ?string
  131.     {
  132.         return $this->dateMaj;
  133.     }
  134.     public function setUtilisateur(?Utilisateur $utilisateur): Champ
  135.     {
  136.         $this->utilisateur $utilisateur;
  137.         return $this;
  138.     }
  139.     public function getUtilisateur(): ?Utilisateur
  140.     {
  141.         return $this->utilisateur;
  142.     }
  143.     
  144.     public function __toString() {
  145.         return $this->libelle;
  146.     }
  147.     public function setEntite(?Entite $entite): Champ
  148.     {
  149.         $this->entite $entite;
  150.         return $this;
  151.     }
  152.     public function getEntite(): ?Entite
  153.     {
  154.         return $this->entite;
  155.     }
  156.     public function setObligatoire(?bool $obligatoire): Champ
  157.     {
  158.         $this->obligatoire $obligatoire;
  159.         return $this;
  160.     }
  161.     public function getObligatoire(): ?bool
  162.     {
  163.         return $this->obligatoire;
  164.     }
  165.     public function setChampDeRecherche(?bool $champDeRecherche): Champ
  166.     {
  167.         $this->champDeRecherche $champDeRecherche;
  168.         return $this;
  169.     }
  170.     public function getChampDeRecherche(): ?bool
  171.     {
  172.         return $this->champDeRecherche;
  173.     }
  174.     public function setAttribut(?string $attribut): Champ
  175.     {
  176.         $this->attribut $attribut;
  177.         return $this;
  178.     }
  179.     public function getAttribut(): ?string
  180.     {
  181.         return $this->attribut;
  182.     }
  183.     public function setEntiteLiaison(?string $entiteLiaison): Champ
  184.     {
  185.         $this->entiteLiaison $entiteLiaison;
  186.         return $this;
  187.     }
  188.     public function getEntiteLiaison(): ?string
  189.     {
  190.         return $this->entiteLiaison;
  191.     }
  192.     public function setChampLiaison(?string $champLiaison): Champ
  193.     {
  194.         $this->champLiaison $champLiaison;
  195.         return $this;
  196.     }
  197.     public function getChampLiaison(): ?string
  198.     {
  199.         return $this->champLiaison;
  200.     }
  201.     public function setTypeDonnees(?string $typeDonnees): Champ
  202.     {
  203.         $this->typeDonnees $typeDonnees;
  204.         return $this;
  205.     }
  206.     public function getTypeDonnees(): ?string
  207.     {
  208.         return $this->typeDonnees;
  209.     }
  210.     public function setExterne(?bool $externe): Champ
  211.     {
  212.         $this->externe $externe;
  213.         return $this;
  214.     }
  215.     public function getExterne(): ?bool
  216.     {
  217.         return $this->externe;
  218.     }
  219. }