src/Entity/EntityBase.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Serializer\Annotation\Groups;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /** @ORM\MappedSuperclass() */
  7. abstract class EntityBase
  8. {
  9.     private $displayName;
  10.     /**
  11.      * @Groups("api")
  12.      * @ORM\Column(type="string", nullable=true, length=255)
  13.      */
  14.     private $nomAr;
  15.     /**
  16.      * @Groups("api")
  17.      * @ORM\Column(type="string", nullable=true, length=255)
  18.      */
  19.     private $nomFr;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=AppUser::class)
  22.      */
  23.     private $createUid;
  24.     public function getCreateUid()
  25.     {
  26.         return $this->createUid;
  27.     }
  28.     public function setCreateUid($createUid): void
  29.     {
  30.         $this->createUid $createUid;
  31.     }
  32.     public function getWriteUid()
  33.     {
  34.         return $this->writeUid;
  35.     }
  36.     public function setWriteUid($writeUid): void
  37.     {
  38.         $this->writeUid $writeUid;
  39.     }
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity=AppUser::class)
  42.      */
  43.     private $writeUid;
  44.     /**
  45.      * @ORM\Column(type="datetime", nullable=true)
  46.      */
  47.     private $createDate;
  48.     /**
  49.      * @ORM\Column(type="datetime", nullable=true)
  50.      */
  51.     private $writeDate;
  52.     /**
  53.      * @Groups("api")
  54.      * @ORM\Column(type="boolean", nullable=true)
  55.      */
  56.     private $active true;
  57.     /**
  58.      * @ORM\ManyToOne(targetEntity=Company::class)
  59.      * @ORM\JoinColumn(nullable=false)
  60.      */
  61.     private $company;
  62.     public function getCreateDate(): ?\DateTimeInterface
  63.     {
  64.         return $this->createDate;
  65.     }
  66.     public function setCreateDate(?\DateTimeInterface $createDate): self
  67.     {
  68.         $this->createDate $createDate;
  69.         return $this;
  70.     }
  71.     public function getWriteDate(): ?\DateTimeInterface
  72.     {
  73.         return $this->writeDate;
  74.     }
  75.     public function setWriteDate(?\DateTimeInterface $writeDate): self
  76.     {
  77.         $this->writeDate $writeDate;
  78.         return $this;
  79.     }
  80.     public function getNomAr(): ?string
  81.     {
  82.         return $this->nomAr;
  83.     }
  84.     public function setNomAr(?string $nomAr): self
  85.     {
  86.         $this->nomAr $nomAr;
  87.         return $this;
  88.     }
  89.     public function getNomFr(): ?string
  90.     {
  91.         return $this->nomFr;
  92.     }
  93.     public function setNomFr(?string $nomFr): self
  94.     {
  95.         $this->nomFr $nomFr;
  96.         return $this;
  97.     }
  98.     public function getActive(): ?bool
  99.     {
  100.         return $this->active;
  101.     }
  102.     public function setActive(bool $active): self
  103.     {
  104.         $this->active $active;
  105.         return $this;
  106.     }
  107.     public function getDisplayName()
  108.     {
  109.         return $this->getNomFr();
  110.     }
  111.     public function getCompany(): ?Company
  112.     {
  113.         return $this->company;
  114.     }
  115.     public function setCompany(?Company $company): self
  116.     {
  117.         $this->company $company;
  118.         return $this;
  119.     }
  120. }