<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\DataFieldFunctionRepository")
*/
class DataFieldFunction
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Nom affiché"})
*/
private $name;
/**
* @ORM\Column(type="text", nullable=true, options={"comment":"Code PHP"})
*/
private $functionCode;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\BlockFieldItem", mappedBy="firstFunction", cascade={"persist","remove"})
*/
// ND 03/04/2022 : je me rends copte que la realtion n'est pas en plac de l'autre côté !
// Pas d'autre choix que de supprimer ce côté pour que le schéma de BDD soit OK
// private $blockFieldsFirstFunctions;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\BlockFieldItem", mappedBy="secondFunction", cascade={"persist","remove"})
*/
// private $blockFieldsSecondFunctions;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\BlockFieldItem", mappedBy="thirdFunction", cascade={"persist","remove"})
*/
// private $blockFieldsThirdFunctions;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\Column(type="integer", nullable=true, options={"default":0, "comment":"code de statut : 0=OK"})
*/
private $state;
public function __construct()
{
/*
$this->blockFieldsFirstFunctions = new ArrayCollection();
$this->blockFieldsSecondFunctions = new ArrayCollection();
$this->blockFieldsThirdFunctions = new ArrayCollection();
*/
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getFunctionCode(): ?string
{
return $this->functionCode;
}
public function setFunctionCode(?string $functionCode): self
{
$this->functionCode = $functionCode;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getState(): ?int
{
return $this->state;
}
public function setState(?int $state): self
{
$this->state = $state;
return $this;
}
}