<?phpnamespace App\Entity\Almacen;use App\Repository\Almacen\DepositoRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;/** * @ORM\Entity(repositoryClass=DepositoRepository::class) * @ORM\Table(name="gral_depositos") * @UniqueEntity( * fields={"nombre"}, * errorPath="nombre", * message="Ya existe un deposito con el nombre ingresado" * ) */class Deposito{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) * @Assert\NotNull(message="El campo es requerido") */ private $nombre; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $ubicacion; /** * @ORM\Column(type="boolean", options={"default": true}) */ private $activo = true; /** * @ORM\Column(type="boolean", options={"default": false}) */ private $depositoDefecto = false; public function __toString() { return $this->nombre; } public function getId(): ?int { return $this->id; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(string $nombre): self { $this->nombre = $nombre; return $this; } public function getUbicacion(): ?string { return $this->ubicacion; } public function setUbicacion(?string $ubicacion): self { $this->ubicacion = $ubicacion; return $this; } public function isActivo(): ?bool { return $this->activo; } public function setActivo(bool $activo): self { $this->activo = $activo; return $this; } public function isDepositoDefecto(): ?bool { return $this->depositoDefecto; } public function setDepositoDefecto(bool $depositoDefecto): self { $this->depositoDefecto = $depositoDefecto; return $this; }}