<?php
namespace App\Entity;
use App\Repository\EstablishmentsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EstablishmentsRepository::class)
*/
class Establishments
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $idPunch = null;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $symbol = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $street = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $zip = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $city = null;
/**
* @ORM\Column(type="float")
*/
private $tax = 0.0;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $numberPhone = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $emailInfo = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $emailInvoice = null;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
/**
* @ORM\Column(type="boolean")
*/
private $validated = false;
/**
* @ORM\Column(type="boolean")
*/
private $enableAppMobile = true;
/**
* @ORM\OneToMany(targetEntity=TypeEstablishment::class, mappedBy="establishment")
*/
private $typeEstablishments;
/**
* @ORM\ManyToOne(targetEntity=EstablishmentStatus::class, inversedBy="establishments")
*/
private $status;
/**
* @ORM\OneToMany(targetEntity=NumberOfCardCustomer::class, mappedBy="establishment")
*/
private $numberOfCardCustomers;
/**
* @ORM\OneToMany(targetEntity=ReferenceUserEstablishment::class, mappedBy="customer")
*/
private $referenceUserEstablishments;
/**
* @ORM\OneToMany(targetEntity=ReferenceUserEstablishment::class, mappedBy="establishment")
*/
private $leadReferenceUserEstablishments;
/**
* @ORM\OneToMany(targetEntity=UserEstablishment::class, mappedBy="establishment")
*/
private $userEstablishments;
/**
* @ORM\OneToMany(targetEntity=Articles::class, mappedBy="supplier")
*/
private $articles;
/**
* @ORM\OneToMany(targetEntity=ShoppingCart::class, mappedBy="establishment")
*/
private $shoppingCarts;
/**
* @ORM\OneToMany(targetEntity=Orders::class, mappedBy="establishment")
*/
private $orders;
/**
* @ORM\ManyToOne(targetEntity=Users::class, inversedBy="establishments")
* @ORM\JoinColumn(nullable=true)
*/
private $responsable;
/**
* @ORM\OneToMany(targetEntity=RequestModification::class, mappedBy="company")
*/
private $requestModifications;
/**
* @ORM\ManyToOne(targetEntity=EstablishmentsCategories::class, inversedBy="establishments")
*/
private $category;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $points;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $closingDays;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $deliveryDays;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $comment;
/**
* @ORM\OneToMany(targetEntity=EstablishmentDateVerified::class, mappedBy="establishment")
*/
private $establishmentDateVerifieds;
/**
* Integer from 1 (Monday) to 7 (Sunday)
* @ORM\Column(type="integer", nullable=true)
*/
private $deliveryDay = null;
/**
* @ORM\OneToMany(targetEntity=Favorite::class, mappedBy="Establishment")
*/
private $favorites;
/**
* @ORM\OneToMany(targetEntity=RestrictionArticle::class, mappedBy="client")
*/
private $restrictionArticles;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $route = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $routeName = null;
/**
* @ORM\ManyToOne(targetEntity=TarifCategory::class, inversedBy="establishments")
*/
private $tarifCategory;
/**
* @ORM\ManyToOne(targetEntity=Establishments::class, inversedBy="establishmentsMaster")
*/
private $establishmentInvoice;
/**
* @ORM\OneToMany(targetEntity=Establishments::class, mappedBy="establishmentInvoice")
*/
private $establishmentsMaster;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $deliveryMoment = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $orderMoment = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $numberOfTax = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $responsableIdPunch = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\OneToMany(targetEntity=Invoice::class, mappedBy="establishment")
*/
private $invoices;
/**
* @ORM\OneToMany(targetEntity=ArticleOrderOutOfStock::class, mappedBy="establishment")
*/
private $articleOrderOutOfStocks;
/**
* @ORM\OneToMany(targetEntity=EstablishmentPromo::class, mappedBy="establishment")
*/
private $establishmentPromos;
/**
* @ORM\OneToMany(targetEntity=BackOrder::class, mappedBy="establishment")
*/
private $backOrders;
/**
* @ORM\OneToMany(targetEntity=InvoiceDownloads::class, mappedBy="establishment")
*/
private $invoiceDownloads;
/**
* @ORM\OneToMany(targetEntity=Roles::class, mappedBy="establishment")
*/
private $roles;
/**
* @ORM\OneToMany(targetEntity=Users::class, mappedBy="connectedAt")
*/
private $usersConnected;
public function __construct()
{
$this->createdAt = new \DateTime();
$this->updatedAt = new \DateTime();
$this->typeEstablishments = new ArrayCollection();
$this->numberOfCardCustomers = new ArrayCollection();
$this->referenceUserEstablishments = new ArrayCollection();
$this->leadReferenceUserEstablishments = new ArrayCollection();
$this->userEstablishments = new ArrayCollection();
$this->articles = new ArrayCollection();
$this->shoppingCarts = new ArrayCollection();
$this->orders = new ArrayCollection();
$this->requestModifications = new ArrayCollection();
$this->establishmentDateVerifieds = new ArrayCollection();
$this->favorites = new ArrayCollection();
$this->restrictionArticles = new ArrayCollection();
$this->establishmentsMaster = new ArrayCollection();
$this->invoices = new ArrayCollection();
$this->articleOrderOutOfStocks = new ArrayCollection();
$this->establishmentPromos = new ArrayCollection();
$this->backOrders = new ArrayCollection();
$this->invoiceDownloads = new ArrayCollection();
$this->roles = new ArrayCollection();
$this->usersConnected = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getIdPunch(): ?string
{
return $this->idPunch;
}
public function setIdPunch(?string $idPunch): self
{
$this->idPunch = $idPunch;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getSymbol(): ?string
{
return $this->symbol;
}
public function setSymbol(?string $symbol): self
{
$this->symbol = $symbol;
return $this;
}
public function getStreet(): ?string
{
return $this->street;
}
public function setStreet(?string $street): self
{
$this->street = $street;
return $this;
}
public function getZip(): ?string
{
return $this->zip;
}
public function setZip(?string $zip): self
{
$this->zip = $zip;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getTax(): ?float
{
return $this->tax;
}
public function setTax(float $tax): self
{
$this->tax = $tax;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getNumberPhone(): ?string
{
return $this->numberPhone;
}
public function setNumberPhone(?string $numberPhone): self
{
$this->numberPhone = $numberPhone;
return $this;
}
public function getEmailInfo(): ?string
{
return $this->emailInfo;
}
public function setEmailInfo(?string $emailInfo): self
{
$this->emailInfo = $emailInfo;
return $this;
}
public function getEmailInvoice(): ?string
{
return $this->emailInvoice;
}
public function setEmailInvoice(?string $emailInvoice): self
{
$this->emailInvoice = $emailInvoice;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function isValidated(): ?bool
{
return $this->validated;
}
public function setValidated(bool $validated): self
{
$this->validated = $validated;
return $this;
}
public function isEnableAppMobile(): ?bool
{
return $this->enableAppMobile;
}
public function setEnableAppMobile(bool $enableAppMobile): self
{
$this->enableAppMobile = $enableAppMobile;
return $this;
}
/**
* @return Collection<int, TypeEstablishment>
*/
public function getTypeEstablishments(): Collection
{
return $this->typeEstablishments;
}
public function addTypeEstablishment(TypeEstablishment $typeEstablishment): self
{
if (!$this->typeEstablishments->contains($typeEstablishment)) {
$this->typeEstablishments[] = $typeEstablishment;
$typeEstablishment->setEstablishment($this);
}
return $this;
}
public function removeTypeEstablishment(TypeEstablishment $typeEstablishment): self
{
if ($this->typeEstablishments->removeElement($typeEstablishment)) {
// set the owning side to null (unless already changed)
if ($typeEstablishment->getEstablishment() === $this) {
$typeEstablishment->setEstablishment(null);
}
}
return $this;
}
public function getStatus(): ?EstablishmentStatus
{
return $this->status;
}
public function setStatus(?EstablishmentStatus $status): self
{
$this->status = $status;
return $this;
}
/**
* @return Collection<int, NumberOfCardCustomer>
*/
public function getNumberOfCardCustomers(): Collection
{
return $this->numberOfCardCustomers;
}
public function addNumberOfCardCustomer(NumberOfCardCustomer $numberOfCardCustomer): self
{
if (!$this->numberOfCardCustomers->contains($numberOfCardCustomer)) {
$this->numberOfCardCustomers[] = $numberOfCardCustomer;
$numberOfCardCustomer->setEstablishment($this);
}
return $this;
}
public function removeNumberOfCardCustomer(NumberOfCardCustomer $numberOfCardCustomer): self
{
if ($this->numberOfCardCustomers->removeElement($numberOfCardCustomer)) {
// set the owning side to null (unless already changed)
if ($numberOfCardCustomer->getEstablishment() === $this) {
$numberOfCardCustomer->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, ReferenceUserEstablishment>
*/
public function getReferenceUserEstablishments(): Collection
{
return $this->referenceUserEstablishments;
}
public function addReferenceUserEstablishment(ReferenceUserEstablishment $referenceUserEstablishment): self
{
if (!$this->referenceUserEstablishments->contains($referenceUserEstablishment)) {
$this->referenceUserEstablishments[] = $referenceUserEstablishment;
$referenceUserEstablishment->setCustomer($this);
}
return $this;
}
public function removeReferenceUserEstablishment(ReferenceUserEstablishment $referenceUserEstablishment): self
{
if ($this->referenceUserEstablishments->removeElement($referenceUserEstablishment)) {
// set the owning side to null (unless already changed)
if ($referenceUserEstablishment->getCustomer() === $this) {
$referenceUserEstablishment->setCustomer(null);
}
}
return $this;
}
/**
* @return Collection<int, ReferenceUserEstablishment>
*/
public function getLeadReferenceUserEstablishments(): Collection
{
return $this->leadReferenceUserEstablishments;
}
public function addLeadReferenceUserEstablishment(ReferenceUserEstablishment $leadReferenceUserEstablishment): self
{
if (!$this->leadReferenceUserEstablishments->contains($leadReferenceUserEstablishment)) {
$this->leadReferenceUserEstablishments[] = $leadReferenceUserEstablishment;
$leadReferenceUserEstablishment->setEstablishment($this);
}
return $this;
}
public function removeLeadReferenceUserEstablishment(ReferenceUserEstablishment $leadReferenceUserEstablishment): self
{
if ($this->leadReferenceUserEstablishments->removeElement($leadReferenceUserEstablishment)) {
// set the owning side to null (unless already changed)
if ($leadReferenceUserEstablishment->getEstablishment() === $this) {
$leadReferenceUserEstablishment->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, UserEstablishment>
*/
public function getUserEstablishments(): Collection
{
return $this->userEstablishments;
}
public function addUserEstablishment(UserEstablishment $userEstablishment): self
{
if (!$this->userEstablishments->contains($userEstablishment)) {
$this->userEstablishments[] = $userEstablishment;
$userEstablishment->setEstablishment($this);
}
return $this;
}
public function removeUserEstablishment(UserEstablishment $userEstablishment): self
{
if ($this->userEstablishments->removeElement($userEstablishment)) {
// set the owning side to null (unless already changed)
if ($userEstablishment->getEstablishment() === $this) {
$userEstablishment->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, Articles>
*/
public function getArticles(): Collection
{
return $this->articles;
}
public function addArticle(Articles $article): self
{
if (!$this->articles->contains($article)) {
$this->articles[] = $article;
$article->setSupplier($this);
}
return $this;
}
public function removeArticle(Articles $article): self
{
if ($this->articles->removeElement($article)) {
// set the owning side to null (unless already changed)
if ($article->getSupplier() === $this) {
$article->setSupplier(null);
}
}
return $this;
}
/**
* @return Collection<int, ShoppingCart>
*/
public function getShoppingCarts(): Collection
{
return $this->shoppingCarts;
}
public function addShoppingCart(ShoppingCart $shoppingCart): self
{
if (!$this->shoppingCarts->contains($shoppingCart)) {
$this->shoppingCarts[] = $shoppingCart;
$shoppingCart->setEstablishment($this);
}
return $this;
}
public function removeShoppingCart(ShoppingCart $shoppingCart): self
{
if ($this->shoppingCarts->removeElement($shoppingCart)) {
// set the owning side to null (unless already changed)
if ($shoppingCart->getEstablishment() === $this) {
$shoppingCart->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, Orders>
*/
public function getOrders(): Collection
{
return $this->orders;
}
public function getStandardOrders(): ?Orders
{
foreach ($this->orders as $order){
if($order->getStandard()){
return $order;
}
}
return null;
}
public function addOrder(Orders $order): self
{
if (!$this->orders->contains($order)) {
$this->orders[] = $order;
$order->setEstablishment($this);
}
return $this;
}
public function removeOrder(Orders $order): self
{
if ($this->orders->removeElement($order)) {
// set the owning side to null (unless already changed)
if ($order->getEstablishment() === $this) {
$order->setEstablishment(null);
}
}
return $this;
}
public function getResponsable(): ?Users
{
return $this->responsable;
}
public function setResponsable(?Users $responsable): self
{
$this->responsable = $responsable;
return $this;
}
/**
* @return Collection<int, RequestModification>
*/
public function getRequestModifications(): Collection
{
return $this->requestModifications;
}
public function addRequestModification(RequestModification $requestModification): self
{
if (!$this->requestModifications->contains($requestModification)) {
$this->requestModifications[] = $requestModification;
$requestModification->setCompany($this);
}
return $this;
}
public function removeRequestModification(RequestModification $requestModification): self
{
if ($this->requestModifications->removeElement($requestModification)) {
// set the owning side to null (unless already changed)
if ($requestModification->getCompany() === $this) {
$requestModification->setCompany(null);
}
}
return $this;
}
public function getCategory(): ?EstablishmentsCategories
{
return $this->category;
}
public function setCategory(?EstablishmentsCategories $category): self
{
$this->category = $category;
return $this;
}
public function getPoints(): ?float
{
return $this->points;
}
public function setPoints(?float $points): self
{
$this->points = $points;
return $this;
}
public function getClosingDays(): ?string
{
return $this->closingDays;
}
public function setClosingDays(?string $closingDays): self
{
$this->closingDays = $closingDays;
return $this;
}
/**
* @return Collection<int, EstablishmentDateVerified>
*/
public function getEstablishmentDateVerifieds(): Collection
{
return $this->establishmentDateVerifieds;
}
public function addEstablishmentDateVerified(EstablishmentDateVerified $establishmentDateVerified): self
{
if (!$this->establishmentDateVerifieds->contains($establishmentDateVerified)) {
$this->establishmentDateVerifieds[] = $establishmentDateVerified;
$establishmentDateVerified->setEstablishment($this);
}
return $this;
}
public function getDeliveryDays(): ?string
{
return $this->deliveryDays;
}
public function setDeliveryDays(?string $deliveryDays): self
{
$this->deliveryDays = $deliveryDays;
return $this;
}
public function removeEstablishmentDateVerified(EstablishmentDateVerified $establishmentDateVerified): self
{
if ($this->establishmentDateVerifieds->removeElement($establishmentDateVerified)) {
// set the owning side to null (unless already changed)
if ($establishmentDateVerified->getEstablishment() === $this) {
$establishmentDateVerified->setEstablishment(null);
}
}
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getDeliveryDay(): ?int
{
return $this->deliveryDay;
}
public function setDeliveryDay(?int $deliveryDay): self
{
$this->deliveryDay = $deliveryDay;
return $this;
}
/**
* @return Collection<int, Favorite>
*/
public function getFavorites(): Collection
{
return $this->favorites;
}
public function addFavorite(Favorite $favorite): self
{
if (!$this->favorites->contains($favorite)) {
$this->favorites[] = $favorite;
$favorite->setEstablishment($this);
}
return $this;
}
public function removeFavorite(Favorite $favorite): self
{
if ($this->favorites->removeElement($favorite)) {
// set the owning side to null (unless already changed)
if ($favorite->getEstablishment() === $this) {
$favorite->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, RestrictionArticle>
*/
public function getRestrictionArticles(): Collection
{
return $this->restrictionArticles;
}
public function addRestrictionArticle(RestrictionArticle $restrictionArticle): self
{
if (!$this->restrictionArticles->contains($restrictionArticle)) {
$this->restrictionArticles[] = $restrictionArticle;
$restrictionArticle->setClient($this);
}
return $this;
}
public function removeRestrictionArticle(RestrictionArticle $restrictionArticle): self
{
if ($this->restrictionArticles->removeElement($restrictionArticle)) {
// set the owning side to null (unless already changed)
if ($restrictionArticle->getClient() === $this) {
$restrictionArticle->setClient(null);
}
}
return $this;
}
public function getRoute(): ?string
{
return $this->route;
}
public function setRoute(?string $route): self
{
$this->route = $route;
return $this;
}
public function getRouteName(): ?string
{
return $this->routeName;
}
public function setRouteName(?string $routeName): self
{
$this->routeName = $routeName;
return $this;
}
public function getTarifCategory(): ?TarifCategory
{
return $this->tarifCategory;
}
public function setTarifCategory(?TarifCategory $tarifCategory): self
{
$this->tarifCategory = $tarifCategory;
return $this;
}
public function getEstablishmentInvoice(): ?self
{
return $this->establishmentInvoice;
}
public function setEstablishmentInvoice(?self $establishmentInvoice): self
{
$this->establishmentInvoice = $establishmentInvoice;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getEstablishmentsMaster(): Collection
{
return $this->establishmentsMaster;
}
public function addEstablishmentsMaster(self $establishmentsMaster): self
{
if (!$this->establishmentsMaster->contains($establishmentsMaster)) {
$this->establishmentsMaster[] = $establishmentsMaster;
$establishmentsMaster->setEstablishmentInvoice($this);
}
return $this;
}
public function removeEstablishmentsMaster(self $establishmentsMaster): self
{
if ($this->establishmentsMaster->removeElement($establishmentsMaster)) {
// set the owning side to null (unless already changed)
if ($establishmentsMaster->getEstablishmentInvoice() === $this) {
$establishmentsMaster->setEstablishmentInvoice(null);
}
}
return $this;
}
public function getDeliveryMoment(): ?string
{
return $this->deliveryMoment;
}
public function setDeliveryMoment(?string $deliveryMoment): self
{
$this->deliveryMoment = $deliveryMoment;
return $this;
}
public function getOrderMoment(): ?string
{
return $this->orderMoment;
}
public function setOrderMoment(?string $orderMoment): self
{
$this->orderMoment = $orderMoment;
return $this;
}
public function getNumberOfTax(): ?string
{
return $this->numberOfTax;
}
public function setNumberOfTax(?string $numberOfTax): self
{
$this->numberOfTax = $numberOfTax;
return $this;
}
public function getResponsableIdPunch(): ?string
{
return $this->responsableIdPunch;
}
public function setResponsableIdPunch(?string $responsableIdPunch): self
{
$this->responsableIdPunch = $responsableIdPunch;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
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[] = $invoice;
$invoice->setEstablishment($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->getEstablishment() === $this) {
$invoice->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, ArticleOrderOutOfStock>
*/
public function getArticleOrderOutOfStocks(): Collection
{
return $this->articleOrderOutOfStocks;
}
public function addArticleOrderOutOfStock(ArticleOrderOutOfStock $articleOrderOutOfStock): self
{
if (!$this->articleOrderOutOfStocks->contains($articleOrderOutOfStock)) {
$this->articleOrderOutOfStocks[] = $articleOrderOutOfStock;
$articleOrderOutOfStock->setEstablishment($this);
}
return $this;
}
public function removeArticleOrderOutOfStock(ArticleOrderOutOfStock $articleOrderOutOfStock): self
{
if ($this->articleOrderOutOfStocks->removeElement($articleOrderOutOfStock)) {
// set the owning side to null (unless already changed)
if ($articleOrderOutOfStock->getEstablishment() === $this) {
$articleOrderOutOfStock->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, EstablishmentPromo>
*/
public function getEstablishmentPromos(): Collection
{
return $this->establishmentPromos;
}
public function addEstablishmentPromo(EstablishmentPromo $establishmentPromo): self
{
if (!$this->establishmentPromos->contains($establishmentPromo)) {
$this->establishmentPromos[] = $establishmentPromo;
$establishmentPromo->setEstablishment($this);
}
return $this;
}
public function removeEstablishmentPromo(EstablishmentPromo $establishmentPromo): self
{
if ($this->establishmentPromos->removeElement($establishmentPromo)) {
// set the owning side to null (unless already changed)
if ($establishmentPromo->getEstablishment() === $this) {
$establishmentPromo->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, BackOrder>
*/
public function getBackOrders(): Collection
{
return $this->backOrders;
}
public function addBackOrder(BackOrder $backOrder): self
{
if (!$this->backOrders->contains($backOrder)) {
$this->backOrders[] = $backOrder;
$backOrder->setEstablishment($this);
}
return $this;
}
public function removeBackOrder(BackOrder $backOrder): self
{
if ($this->backOrders->removeElement($backOrder)) {
// set the owning side to null (unless already changed)
if ($backOrder->getEstablishment() === $this) {
$backOrder->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, InvoiceDownloads>
*/
public function getInvoiceDownloads(): Collection
{
return $this->invoiceDownloads;
}
public function addInvoiceDownload(InvoiceDownloads $invoiceDownload): self
{
if (!$this->invoiceDownloads->contains($invoiceDownload)) {
$this->invoiceDownloads[] = $invoiceDownload;
$invoiceDownload->setEstablishment($this);
}
return $this;
}
public function removeInvoiceDownload(InvoiceDownloads $invoiceDownload): self
{
if ($this->invoiceDownloads->removeElement($invoiceDownload)) {
// set the owning side to null (unless already changed)
if ($invoiceDownload->getEstablishment() === $this) {
$invoiceDownload->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, Roles>
*/
public function getRoles(): Collection
{
return $this->roles;
}
public function addRole(Roles $role): self
{
if (!$this->roles->contains($role)) {
$this->roles[] = $role;
$role->setEstablishment($this);
}
return $this;
}
public function removeRole(Roles $role): self
{
if ($this->roles->removeElement($role)) {
// set the owning side to null (unless already changed)
if ($role->getEstablishment() === $this) {
$role->setEstablishment(null);
}
}
return $this;
}
/**
* @return Collection<int, Users>
*/
public function getUsersConnected(): Collection
{
return $this->usersConnected;
}
public function addUsersConnected(Users $usersConnected): self
{
if (!$this->usersConnected->contains($usersConnected)) {
$this->usersConnected[] = $usersConnected;
$usersConnected->setConnectedAt($this);
}
return $this;
}
public function removeUsersConnected(Users $usersConnected): self
{
if ($this->usersConnected->removeElement($usersConnected)) {
// set the owning side to null (unless already changed)
if ($usersConnected->getConnectedAt() === $this) {
$usersConnected->setConnectedAt(null);
}
}
return $this;
}
}