src/Application/Internit/IntegracaoBundle/Sienge/Entity/Unidade.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Application\Internit\IntegracaoBundle\Sienge\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Application\Internit\IntegracaoBundle\Sienge\Repository\UnidadeRepository;
  5. /**
  6.  * Unidade - Cache local de unidades do Sienge
  7.  */
  8. #[ORM\Table(name'integracao_sienge_unidade')]
  9. #[ORM\Entity(repositoryClassUnidadeRepository::class)]
  10. #[ORM\Index(columns: ['sienge_unit_id'])]
  11. #[ORM\Index(columns: ['empreendimento_id'])]
  12. class Unidade
  13. {
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column(name'id'type'integer'uniquetruenullablefalse)]
  17.     private ?int $id null;
  18.     /**
  19.      * ID da unidade no Sienge
  20.      */
  21.     #[ORM\Column(name'sienge_unit_id'type'string'length255nullablefalse)]
  22.     private string $siengeUnitId;
  23.     /**
  24.      * Tipo de unidade (apto, loja, sala, etc)
  25.      */
  26.     #[ORM\Column(name'tipo'type'string'length100nullabletrue)]
  27.     private ?string $tipo null;
  28.     /**
  29.      * Número/Identificação da unidade
  30.      */
  31.     #[ORM\Column(name'numero'type'string'length50nullabletrue)]
  32.     private ?string $numero null;
  33.     /**
  34.      * Bloco/Torre
  35.      */
  36.     #[ORM\Column(name'bloco'type'string'length50nullabletrue)]
  37.     private ?string $bloco null;
  38.     /**
  39.      * Andar
  40.      */
  41.     #[ORM\Column(name'andar'type'integer'nullabletrue)]
  42.     private ?int $andar null;
  43.     /**
  44.      * Metragem
  45.      */
  46.     #[ORM\Column(name'metragem'type'decimal'precision10scale2nullabletrue)]
  47.     private ?string $metragem null;
  48.     /**
  49.      * Valor da unidade
  50.      */
  51.     #[ORM\Column(name'valor'type'decimal'precision15scale2nullabletrue)]
  52.     private ?string $valor null;
  53.     /**
  54.      * Status da unidade
  55.      */
  56.     #[ORM\Column(name'status'type'string'length50nullabletrue)]
  57.     private ?string $status null;
  58.     /**
  59.      * Empreendimento relacionado
  60.      */
  61.     #[ORM\ManyToOne(targetEntityEmpreendimento::class, inversedBy'unidades')]
  62.     #[ORM\JoinColumn(name'empreendimento_id'referencedColumnName'id'nullablefalse)]
  63.     private ?Empreendimento $empreendimento null;
  64.     /**
  65.      * Data de sincronização
  66.      */
  67.     #[ORM\Column(name'data_sincronizacao'type'datetime'nullablefalse)]
  68.     private \DateTimeInterface $dataSincronizacao;
  69.     public function __construct()
  70.     {
  71.         $this->dataSincronizacao = new \DateTime();
  72.     }
  73.     public function getId(): ?int
  74.     {
  75.         return $this->id;
  76.     }
  77.     public function getSiengeUnitId(): string
  78.     {
  79.         return $this->siengeUnitId;
  80.     }
  81.     public function setSiengeUnitId(string $siengeUnitId): self
  82.     {
  83.         $this->siengeUnitId $siengeUnitId;
  84.         return $this;
  85.     }
  86.     public function getTipo(): ?string
  87.     {
  88.         return $this->tipo;
  89.     }
  90.     public function setTipo(?string $tipo): self
  91.     {
  92.         $this->tipo $tipo;
  93.         return $this;
  94.     }
  95.     public function getNumero(): ?string
  96.     {
  97.         return $this->numero;
  98.     }
  99.     public function setNumero(?string $numero): self
  100.     {
  101.         $this->numero $numero;
  102.         return $this;
  103.     }
  104.     public function getBloco(): ?string
  105.     {
  106.         return $this->bloco;
  107.     }
  108.     public function setBloco(?string $bloco): self
  109.     {
  110.         $this->bloco $bloco;
  111.         return $this;
  112.     }
  113.     public function getAndar(): ?int
  114.     {
  115.         return $this->andar;
  116.     }
  117.     public function setAndar(?int $andar): self
  118.     {
  119.         $this->andar $andar;
  120.         return $this;
  121.     }
  122.     public function getMetragem(): ?string
  123.     {
  124.         return $this->metragem;
  125.     }
  126.     public function setMetragem(?string $metragem): self
  127.     {
  128.         $this->metragem $metragem;
  129.         return $this;
  130.     }
  131.     public function getValor(): ?string
  132.     {
  133.         return $this->valor;
  134.     }
  135.     public function setValor(?string $valor): self
  136.     {
  137.         $this->valor $valor;
  138.         return $this;
  139.     }
  140.     public function getStatus(): ?string
  141.     {
  142.         return $this->status;
  143.     }
  144.     public function setStatus(?string $status): self
  145.     {
  146.         $this->status $status;
  147.         return $this;
  148.     }
  149.     public function getEmpreendimento(): ?Empreendimento
  150.     {
  151.         return $this->empreendimento;
  152.     }
  153.     public function setEmpreendimento(?Empreendimento $empreendimento): self
  154.     {
  155.         $this->empreendimento $empreendimento;
  156.         return $this;
  157.     }
  158.     public function getDataSincronizacao(): \DateTimeInterface
  159.     {
  160.         return $this->dataSincronizacao;
  161.     }
  162.     public function setDataSincronizacao(\DateTimeInterface $dataSincronizacao): self
  163.     {
  164.         $this->dataSincronizacao $dataSincronizacao;
  165.         return $this;
  166.     }
  167. }