src/Entity/App/ComponenteTitulo.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\App;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
  6. use Gedmo\Timestampable\Traits\TimestampableEntity;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\Repository\App\ComponenteTituloRepository")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
  12.  */
  13. class ComponenteTitulo
  14. {
  15.     /**
  16.      * @var integer|null
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string|null
  24.      * @ORM\Column(type="string", name="titulo")
  25.      * @ORM\Column(type="string", nullable=false)
  26.      * @Assert\Length(
  27.      *  max = 70,
  28.      *  maxMessage = "La cantidad maxima es {{ limit }} caracteres"
  29.      *  )
  30.      * @Assert\NotNull(message="El valor es requerido")
  31.      */
  32.     private ?string $titulo;
  33.     /**
  34.      * @var string|null
  35.      * @ORM\Column(type="string", name="descripcion")
  36.      * @ORM\Column(type="string", nullable=false)
  37.      * @Assert\Length(
  38.      *  max = 160,
  39.      *  maxMessage = "La cantidad maxima es {{ limit }} caracteres"
  40.      *  )
  41.      * @Assert\NotNull(message="El valor es requerido")
  42.      */
  43.     private ?string $descripcion;
  44.     /**
  45.      * @var string|null
  46.      * @ORM\Column(type="string", name="tipo_categoria")
  47.      * @ORM\Column(type="string", nullable=false)
  48.      * @Assert\NotNull(message="El valor es requerido")
  49.      */
  50.     private ?string $tipoCategoria;
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function setId(?int $id): void
  56.     {
  57.         $this->id $id;
  58.     }
  59.     public function getTitulo(): ?string
  60.     {
  61.         return $this->titulo;
  62.     }
  63.     public function setTitulo(?string $titulo): void
  64.     {
  65.         $this->titulo $titulo;
  66.     }
  67.     public function getDescripcion(): ?string
  68.     {
  69.         return $this->descripcion;
  70.     }
  71.     public function setDescripcion(?string $descripcion): void
  72.     {
  73.         $this->descripcion $descripcion;
  74.     }
  75.     public function getTipoCategoria(): ?string
  76.     {
  77.         return $this->tipoCategoria;
  78.     }
  79.     public function setTipoCategoria(?string $tipoCategoria): void
  80.     {
  81.         $this->tipoCategoria $tipoCategoria;
  82.     }
  83.     use TimestampableEntity;
  84.     use SoftDeleteableEntity;
  85. }