src/Application/Internit/UnidadeBundle/Entity/Unidade.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\Application\Internit\UnidadeBundle\Entity;
  3. use App\Application\Internit\UnidadeBundle\Repository\UnidadeRepository;
  4. use App\Application\Internit\BlocoBundle\Entity\Bloco;
  5. use App\Application\Internit\UnidadeClienteBundle\Entity\UnidadeCliente;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use App\Entity\SonataMediaGallery;
  11. use App\Entity\SonataMediaMedia;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use DateTime;
  14. /** Info:  */
  15. #[ORM\Table(name: 'unidade')]
  16. #[ORM\Entity(repositoryClass: UnidadeRepository::class)]
  17. #[UniqueEntity('id')]
  18. class Unidade
  19. {
  20.     #[ORM\Id]
  21.     #[ORM\GeneratedValue]
  22.     #[ORM\Column(name: 'id', type: 'integer', unique: true, nullable: false)]
  23.     private ?int $id = null;
  24.     #[ORM\Column(name: 'import_id', type: 'integer', unique: false, nullable: true)]
  25.     private ?int $importId;
  26.     #[ORM\Column(name: 'import', type: 'boolean', unique: false, nullable: true)]
  27.     private bool $import;
  28.     ##[Assert\NotNull]
  29.     ##[Assert\NotBlank]
  30.     #[ORM\Column(name: 'unidade', type: 'string', unique: false, nullable: true)]
  31.     private ?string $unidade = null;
  32.     #[ORM\Column(name: 'andar', type: 'string', unique: false, nullable: true)]
  33.     private ?string $andar = "";
  34.     #[ORM\Column(name: 'coluna', type: 'integer', unique: false, nullable: true)]
  35.     private ?int $coluna;
  36.     #[ORM\Column(name: 'descricao', type: 'text', unique: false, nullable: true)]
  37.     private ?string $descricao = null;
  38.     #[ORM\Column(name: 'visivel', type: 'boolean', unique: false, nullable: true)]
  39.     private ?bool $visivel = null;
  40.     #[ORM\ManyToOne(targetEntity: Bloco::class, inversedBy: 'unidades')]
  41.     #[ORM\JoinColumn(name: 'bloco_id', referencedColumnName: 'id', onDelete: 'SET NULL')]
  42.     private Bloco|null $bloco = null;
  43.     #[ORM\OneToMany(mappedBy: 'unidade', targetEntity: UnidadeCliente::class)]
  44.     private Collection $clientes;
  45.     private ?int $andarQtd = null;
  46.     private ?int $andarDe = null;
  47.     private ?int $andarAte = null;
  48.     private $empreendimento;
  49.     public function __construct()
  50.     {
  51.         $this->clientes = new ArrayCollection();
  52.     }
  53.     public function getId(): ?int
  54.     {
  55.         return $this->id;
  56.     }
  57.     /**
  58.      * @return int|null
  59.      */
  60.     public function getImportId(): ?int
  61.     {
  62.         return $this->importId;
  63.     }
  64.     /**
  65.      * @param int|null $importId
  66.      */
  67.     public function setImportId(?int $importId): void
  68.     {
  69.         $this->importId = $importId;
  70.     }
  71.     /**
  72.      * @return bool
  73.      */
  74.     public function isImport(): bool
  75.     {
  76.         return $this->import;
  77.     }
  78.     /**
  79.      * @param bool $import
  80.      */
  81.     public function setImport(bool $import): void
  82.     {
  83.         $this->import = $import;
  84.     }
  85.     /**
  86.      * @return string|null
  87.      */
  88.     public function getUnidade(): ?string
  89.     {
  90.         return $this->unidade;
  91.     }
  92.     /**
  93.      * @param string|null $unidade
  94.      */
  95.     public function setUnidade(?string $unidade): void
  96.     {
  97.         $this->unidade = $unidade;
  98.     }
  99.     public function getDescricao(): ?string
  100.     {
  101.         return $this->descricao;
  102.     }
  103.     public function setDescricao(?string $descricao): void
  104.     {
  105.         $this->descricao = $descricao;
  106.     }
  107.     public function getAndar(): ?string
  108.     {
  109.         return $this->andar;
  110.     }
  111.     public function setAndar(?string $andar): void
  112.     {
  113.         $this->andar = $andar;
  114.     }
  115.     /**
  116.      * @return int|null
  117.      */
  118.     public function getColuna(): ?int
  119.     {
  120.         return $this->coluna;
  121.     }
  122.     /**
  123.      * @param int|null $coluna
  124.      */
  125.     public function setColuna(?int $coluna): void
  126.     {
  127.         $this->coluna = $coluna;
  128.     }
  129.     public function getVisivel(): ?bool
  130.     {
  131.         return $this->visivel;
  132.     }
  133.     public function setVisivel(?bool $visivel): void
  134.     {
  135.         $this->visivel = $visivel;
  136.     }
  137.     public function getBloco(): ?Bloco
  138.     {
  139.         return $this->bloco;
  140.     }
  141.     public function setBloco(?Bloco $bloco): void
  142.     {
  143.         $this->bloco = $bloco;
  144.     }
  145.     public function getClientes(): Collection
  146.     {
  147.         return $this->clientes;
  148.     }
  149.     public function setClientes(Collection $clientes): void
  150.     {
  151.         $this->clientes = $clientes;
  152.     }
  153.     public function getEmpreendimento()
  154.     {
  155.         return $this->empreendimento;
  156.     }
  157.     public function setEmpreendimento($empreendimento): void
  158.     {
  159.         $this->empreendimento = $empreendimento;
  160.     }
  161.     public function getAndarQtd(): ?int
  162.     {
  163.         return $this->andarQtd;
  164.     }
  165.     public function setAndarQtd(?int $andarQtd): void
  166.     {
  167.         $this->andarQtd = $andarQtd;
  168.     }
  169.     public function getAndarDe(): ?int
  170.     {
  171.         return $this->andarDe;
  172.     }
  173.     public function setAndarDe(?int $andarDe): void
  174.     {
  175.         $this->andarDe = $andarDe;
  176.     }
  177.     public function getAndarAte(): ?int
  178.     {
  179.         return $this->andarAte;
  180.     }
  181.     public function setAndarAte(?int $andarAte): void
  182.     {
  183.         $this->andarAte = $andarAte;
  184.     }
  185. }