src/Entity/Sucursal.php line 19
<?phpnamespace App\Entity;use App\Interfaces\OwnerCompanyCompanyInterface;use App\Repository\SucursalRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Symfony\Component\Serializer\Annotation\Groups;use Symfony\Component\Validator\Constraints\Image;use Vich\UploaderBundle\Mapping\Annotation\Uploadable;use Vich\UploaderBundle\Mapping\Annotation\UploadableField;#[ORM\Entity(repositoryClass: SucursalRepository::class)]#[Uploadable]class Sucursal implements OwnerCompanyCompanyInterface{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]#[Groups(["sucursal_out"])]private ?int $id = null;#[ORM\ManyToOne(inversedBy: 'sucursals')]#[ORM\JoinColumn(nullable: false)]private ?SriInfo $company = null;#[ORM\Column(length: 255)]#[Groups(["sucursal_out"])]private ?string $location = null;#[ORM\Column(length: 50)]#[Groups(["sucursal_out"])]private ?string $email = null;#[ORM\Column(length: 20, nullable: true)]#[Groups(["sucursal_out"])]private ?string $phone = null;#[ORM\Column(length: 5)]#[Groups(["sucursal_out"])]private ?string $establishment = null;#[ORM\Column(length: 5)]#[Groups(["sucursal_out"])]private ?string $emitionPoint = null;#[ORM\OneToMany(mappedBy: 'sucursal', targetEntity: Sequence::class, cascade: ['persist', 'remove'], orphanRemoval: true)]private Collection $sequences;#[ORM\Column(length: 255)]#[Groups(["sucursal_out"])]private ?string $Name = null;#[ORM\OneToMany(mappedBy: 'sucursal', targetEntity: Invoice::class)]private Collection $invoices;#[ORM\Column(length: 255, nullable: true)]private ?string $image = null;#[UploadableField('sucursal', 'image')]#[Image(maxSize: "1M", mimeTypes: ["image/jpeg", "image/png"])]private ?File $imageFile = null;#[ORM\Column(nullable: true)]private ?int $external = null;#[ORM\Column(length: 10)]private ?string $numeroCasa = null;#[ORM\Column(length: 255, nullable: true)]private ?string $complementoDireccion1 = null;#[ORM\Column(length: 255, nullable: true)]private ?string $complementoDireccion2 = null;#[ORM\Column]private ?int $departamento = null;#[ORM\Column(length: 255)]private ?string $departamentoDescripcion = null;#[ORM\Column]private ?int $distrito = null;#[ORM\Column(length: 255)]private ?string $distritoDescripcion = null;#[ORM\Column]private ?int $ciudad = null;#[ORM\Column(length: 255)]private ?string $ciudadDescripcion = null;#[ORM\Column(length: 255, nullable: true)]private ?string $denominacion = null;#[ORM\OneToMany(mappedBy: 'sucursal', targetEntity: SriPayment::class)]private Collection $sriPayments;#[ORM\OneToMany(mappedBy: 'sucursal', targetEntity: PaymentCredit::class)]private Collection $paymentCredits;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $updatedDate = null;public function __construct(){$this->sequences = new ArrayCollection();$this->invoices = new ArrayCollection();$this->sriPayments = new ArrayCollection();$this->paymentCredits = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getCompany(): ?SriInfo{return $this->company;}public function setCompany(?SriInfo $company): self{$this->company = $company;return $this;}public function getLocation(): ?string{return $this->location;}public function setLocation(string $location): self{$this->location = $location;return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(string $email): self{$this->email = $email;return $this;}public function getPhone(): ?string{return $this->phone;}public function setPhone(?string $phone): self{$this->phone = $phone;return $this;}public function getEstablishment(): ?string{return $this->establishment;}public function setEstablishment(string $establishment): self{$this->establishment = $establishment;return $this;}public function getEmitionPoint(): ?string{return $this->emitionPoint;}public function setEmitionPoint(string $emitionPoint): self{$this->emitionPoint = $emitionPoint;return $this;}/*** @return Collection<int, Sequence>*/public function getSequences(): Collection{return $this->sequences;}public function addSequence(Sequence $sequence): self{if (!$this->sequences->contains($sequence)) {$this->sequences->add($sequence);$sequence->setSucursal($this);}return $this;}public function removeSequence(Sequence $sequence): self{if ($this->sequences->removeElement($sequence)) {// set the owning side to null (unless already changed)if ($sequence->getSucursal() === $this) {$sequence->setSucursal(null);}}return $this;}public function getName(): ?string{return $this->Name;}public function setName(string $Name): self{$this->Name = $Name;return $this;}/*** @return Collection<int, Invoice>*/public function getInvoices(): Collection{return $this->invoices;}public function addInvoice(Invoice $invoice): self{if (!$this->invoices->contains($invoice)) {$this->invoices->add($invoice);$invoice->setSucursal($this);}return $this;}public function removeInvoice(Invoice $invoice): self{if ($this->invoices->removeElement($invoice)) {// set the owning side to null (unless already changed)if ($invoice->getSucursal() === $this) {$invoice->setSucursal(null);}}return $this;}public function getImage(): ?string{return $this->image;}public function setImage(?string $image): self{$this->image = $image;return $this;}/*** @return File|null*/public function getImageFile(): ?File{return $this->imageFile;}/*** @param File|null $imageFile*/public function setImageFile(?File $imageFile): void{$this->imageFile = $imageFile;if ($imageFile !== null) {$this->updatedDate = new \DateTimeImmutable();}}public function getExternal(): ?int{return $this->external;}public function setExternal(?int $external): self{$this->external = $external;return $this;}public function getNumeroCasa(): ?string{return $this->numeroCasa;}public function setNumeroCasa(string $numeroCasa): static{$this->numeroCasa = $numeroCasa;return $this;}public function getComplementoDireccion1(): ?string{return $this->complementoDireccion1;}public function setComplementoDireccion1(?string $complementoDireccion1): static{$this->complementoDireccion1 = $complementoDireccion1;return $this;}public function getComplementoDireccion2(): ?string{return $this->complementoDireccion2;}public function setComplementoDireccion2(?string $complementoDireccion2): static{$this->complementoDireccion2 = $complementoDireccion2;return $this;}public function getDepartamento(): ?int{return $this->departamento;}public function setDepartamento(int $departamento): static{$this->departamento = $departamento;return $this;}public function getDepartamentoDescripcion(): ?string{return $this->departamentoDescripcion;}public function setDepartamentoDescripcion(string $departamentoDescripcion): static{$this->departamentoDescripcion = $departamentoDescripcion;return $this;}public function getDistrito(): ?int{return $this->distrito;}public function setDistrito(int $distrito): static{$this->distrito = $distrito;return $this;}public function getDistritoDescripcion(): ?string{return $this->distritoDescripcion;}public function setDistritoDescripcion(string $distritoDescripcion): static{$this->distritoDescripcion = $distritoDescripcion;return $this;}public function getCiudad(): ?int{return $this->ciudad;}public function setCiudad(int $ciudad): static{$this->ciudad = $ciudad;return $this;}public function getCiudadDescripcion(): ?string{return $this->ciudadDescripcion;}public function setCiudadDescripcion(string $ciudadDescripcion): static{$this->ciudadDescripcion = $ciudadDescripcion;return $this;}public function getDenominacion(): ?string{return $this->denominacion;}public function setDenominacion(?string $denominacion): static{$this->denominacion = $denominacion;return $this;}/*** @return Collection<int, SriPayment>*/public function getSriPayments(): Collection{return $this->sriPayments;}public function addSriPayment(SriPayment $sriPayment): static{if (!$this->sriPayments->contains($sriPayment)) {$this->sriPayments->add($sriPayment);$sriPayment->setSucursal($this);}return $this;}public function removeSriPayment(SriPayment $sriPayment): static{if ($this->sriPayments->removeElement($sriPayment)) {// set the owning side to null (unless already changed)if ($sriPayment->getSucursal() === $this) {$sriPayment->setSucursal(null);}}return $this;}/*** @return Collection<int, PaymentCredit>*/public function getPaymentCredits(): Collection{return $this->paymentCredits;}public function addPaymentCredit(PaymentCredit $paymentCredit): static{if (!$this->paymentCredits->contains($paymentCredit)) {$this->paymentCredits->add($paymentCredit);$paymentCredit->setSucursal($this);}return $this;}public function removePaymentCredit(PaymentCredit $paymentCredit): static{if ($this->paymentCredits->removeElement($paymentCredit)) {// set the owning side to null (unless already changed)if ($paymentCredit->getSucursal() === $this) {$paymentCredit->setSucursal(null);}}return $this;}public function getUpdatedDate(): ?\DateTimeInterface{return $this->updatedDate;}public function setUpdatedDate(?\DateTimeInterface $updatedDate): static{$this->updatedDate = $updatedDate;return $this;}function getSriInfo(){return $this->getCompany();}}