src/Entity/Attachment.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AttachmentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. /**
  7.  * @ORM\Entity(repositoryClass=AttachmentRepository::class)
  8.  * @UniqueEntity(fields={"label"}, message="Ce type de pièce jointe existe déjà.")
  9.  */
  10. class Attachment
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=511, nullable=true)
  20.      */
  21.     private $label;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Users::class)
  24.      */
  25.     private $userCreate;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=Users::class)
  28.      */
  29.     private $userUpdate;
  30.     /**
  31.      * @ORM\Column(type="datetime", nullable=true)
  32.      */
  33.     private $dateCreate;
  34.     /**
  35.      * @ORM\Column(type="datetime", nullable=true)
  36.      */
  37.     private $dateUpdate;
  38.     /**
  39.      * @ORM\Column(type="boolean")
  40.      */
  41.     private $isDeleted;
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getLabel(): ?string
  47.     {
  48.         return $this->label;
  49.     }
  50.     public function setLabel(?string $label): self
  51.     {
  52.         $this->label $label;
  53.         return $this;
  54.     }
  55.     public function getUserCreate(): ?Users
  56.     {
  57.         return $this->userCreate;
  58.     }
  59.     public function setUserCreate(?Users $userCreate): self
  60.     {
  61.         $this->userCreate $userCreate;
  62.         return $this;
  63.     }
  64.     public function getUserUpdate(): ?Users
  65.     {
  66.         return $this->userUpdate;
  67.     }
  68.     public function setUserUpdate(?Users $userUpdate): self
  69.     {
  70.         $this->userUpdate $userUpdate;
  71.         return $this;
  72.     }
  73.     public function getDateCreate(): ?\DateTimeInterface
  74.     {
  75.         return $this->dateCreate;
  76.     }
  77.     public function setDateCreate(?\DateTimeInterface $dateCreate): self
  78.     {
  79.         $this->dateCreate $dateCreate;
  80.         return $this;
  81.     }
  82.     public function getDateUpdate(): ?\DateTimeInterface
  83.     {
  84.         return $this->dateUpdate;
  85.     }
  86.     public function setDateUpdate(?\DateTimeInterface $dateUpdate): self
  87.     {
  88.         $this->dateUpdate $dateUpdate;
  89.         return $this;
  90.     }
  91.     public function getIsDeleted(): ?bool
  92.     {
  93.         return $this->isDeleted;
  94.     }
  95.     public function setIsDeleted(bool $isDeleted): self
  96.     {
  97.         $this->isDeleted $isDeleted;
  98.         return $this;
  99.     }
  100. }