src/Entity/CMaterial.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  5. /**
  6.  * CMaterial
  7.  *
  8.  * @ORM\Table(name="c_material", indexes={@ORM\Index(name="equipo_c_material_FK", columns={"id_material"})})
  9.  * @ORM\Entity
  10.  * @UniqueEntity(fields={"material"}, message="Existe la marca registrada con el mismo nombre")
  11.  */
  12. class CMaterial
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id_material", type="integer", nullable=false)
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="IDENTITY")
  20.      */
  21.     private $idMaterial;
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="material", type="string", length=50, nullable=false)
  26.      */
  27.     private $material;
  28.     public function getIdMaterial(): ?int
  29.     {
  30.         return $this->idMaterial;
  31.     }
  32.     public function getMaterial(): ?string
  33.     {
  34.         return $this->material;
  35.     }
  36.     public function setMaterial(string $material): self
  37.     {
  38.         $this->material $material;
  39.         return $this;
  40.     }
  41. // Entidad de ubicacion
  42. }