src/Entity/DataFieldFunction.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\DataFieldFunctionRepository")
  8.  */
  9. class DataFieldFunction
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Nom affiché"})
  19.      */
  20.     private $name;
  21.     /**
  22.      * @ORM\Column(type="text", nullable=true, options={"comment":"Code PHP"})
  23.      */
  24.     private $functionCode;
  25.     /**
  26.      * @var \Doctrine\Common\Collections\Collection
  27.      *
  28.      * @ORM\OneToMany(targetEntity="App\Entity\BlockFieldItem", mappedBy="firstFunction", cascade={"persist","remove"})
  29.      */
  30.     // ND 03/04/2022 : je me rends copte que la realtion n'est pas en plac de l'autre côté !
  31.     // Pas d'autre choix que de supprimer ce côté pour que le schéma de BDD soit OK
  32.     // private $blockFieldsFirstFunctions;
  33.     /**
  34.      * @var \Doctrine\Common\Collections\Collection
  35.      *
  36.      * @ORM\OneToMany(targetEntity="App\Entity\BlockFieldItem", mappedBy="secondFunction", cascade={"persist","remove"})
  37.      */
  38.     // private $blockFieldsSecondFunctions;
  39.     /**
  40.      * @var \Doctrine\Common\Collections\Collection
  41.      *
  42.      * @ORM\OneToMany(targetEntity="App\Entity\BlockFieldItem", mappedBy="thirdFunction", cascade={"persist","remove"})
  43.      */
  44.     // private $blockFieldsThirdFunctions;
  45.     /**
  46.      * @ORM\Column(type="datetime", nullable=true)
  47.      */
  48.     private $createdAt;
  49.     /**
  50.      * @ORM\Column(type="datetime", nullable=true)
  51.      */
  52.     private $updatedAt;
  53.     /**
  54.      * @ORM\Column(type="integer", nullable=true, options={"default":0, "comment":"code de statut : 0=OK"})
  55.      */
  56.     private $state;
  57.     public function __construct()
  58.     {
  59.         /*
  60.         $this->blockFieldsFirstFunctions = new ArrayCollection();
  61.         $this->blockFieldsSecondFunctions = new ArrayCollection();
  62.         $this->blockFieldsThirdFunctions = new ArrayCollection();
  63.         */
  64.     }
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getName(): ?string
  70.     {
  71.         return $this->name;
  72.     }
  73.     public function setName(?string $name): self
  74.     {
  75.         $this->name $name;
  76.         return $this;
  77.     }
  78.     public function getFunctionCode(): ?string
  79.     {
  80.         return $this->functionCode;
  81.     }
  82.     public function setFunctionCode(?string $functionCode): self
  83.     {
  84.         $this->functionCode $functionCode;
  85.         return $this;
  86.     }
  87.     public function getCreatedAt(): ?\DateTimeInterface
  88.     {
  89.         return $this->createdAt;
  90.     }
  91.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  92.     {
  93.         $this->createdAt $createdAt;
  94.         return $this;
  95.     }
  96.     public function getUpdatedAt(): ?\DateTimeInterface
  97.     {
  98.         return $this->updatedAt;
  99.     }
  100.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  101.     {
  102.         $this->updatedAt $updatedAt;
  103.         return $this;
  104.     }
  105.     public function getState(): ?int
  106.     {
  107.         return $this->state;
  108.     }
  109.     public function setState(?int $state): self
  110.     {
  111.         $this->state $state;
  112.         return $this;
  113.     }
  114. }