src/Entity/App/Reparticion.php line 26

Open in your IDE?
  1. <?php
  2. namespace App\Entity\App;
  3. use App\Utils\Traits\PosicionTrait;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\App\ReparticionRepository;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
  8. use Gedmo\Timestampable\Traits\TimestampableEntity;
  9. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  10. /**
  11.  * @ORM\Entity(repositoryClass=ReparticionRepository::Class)
  12.  * @ORM\HasLifecycleCallbacks()
  13.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
  14.  * @UniqueEntity(
  15.  *       fields={"valor"},
  16.  *       message="Estas siglas de repartición ya están cargadas."
  17.  *   )
  18.  * @UniqueEntity(
  19.  *        fields={"descripcion"},
  20.  *        message="Este nombre de repartición ya está cargado."
  21.  *    )
  22.  */
  23. class Reparticion
  24. {
  25.     /**
  26.      * @var integer | null
  27.      * @ORM\Id()
  28.      * @ORM\GeneratedValue(strategy="AUTO")
  29.      * @ORM\Column(type="integer")
  30.      */
  31.     private $id;
  32.     /**
  33.      * @var string | null
  34.      * @ORM\Column(type="string")
  35.      */
  36.     private $valor;
  37.     /**
  38.      * @var string | null
  39.      * @ORM\Column(type="string")
  40.      */
  41.     private $descripcion;
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function setId(?int $id): void
  47.     {
  48.         $this->id $id;
  49.     }
  50.     public function getValor(): ?string
  51.     {
  52.         return $this->valor;
  53.     }
  54.     public function setValor(?string $valor): void
  55.     {
  56.         $this->valor $valor;
  57.     }
  58.     public function getDescripcion(): ?string
  59.     {
  60.         return $this->descripcion;
  61.     }
  62.     public function setDescripcion(?string $descripcion): void
  63.     {
  64.         $this->descripcion $descripcion;
  65.     }
  66.     use PosicionTrait;
  67.     use TimestampableEntity;
  68.     use SoftDeleteableEntity;
  69. }