<?php
namespace App\Entity\App;
use App\Utils\Traits\PosicionTrait;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\App\ReparticionRepository;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass=ReparticionRepository::Class)
* @ORM\HasLifecycleCallbacks()
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
* @UniqueEntity(
* fields={"valor"},
* message="Estas siglas de repartición ya están cargadas."
* )
* @UniqueEntity(
* fields={"descripcion"},
* message="Este nombre de repartición ya está cargado."
* )
*/
class Reparticion
{
/**
* @var integer | null
* @ORM\Id()
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var string | null
* @ORM\Column(type="string")
*/
private $valor;
/**
* @var string | null
* @ORM\Column(type="string")
*/
private $descripcion;
public function getId(): ?int
{
return $this->id;
}
public function setId(?int $id): void
{
$this->id = $id;
}
public function getValor(): ?string
{
return $this->valor;
}
public function setValor(?string $valor): void
{
$this->valor = $valor;
}
public function getDescripcion(): ?string
{
return $this->descripcion;
}
public function setDescripcion(?string $descripcion): void
{
$this->descripcion = $descripcion;
}
use PosicionTrait;
use TimestampableEntity;
use SoftDeleteableEntity;
}