<?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @ORM\Entity(repositoryClass=UserRepository::class)
* @UniqueEntity(fields={"email"}, message="There is already an account with this email")
* @ORM\HasLifecycleCallbacks
*/
class User extends AbstractEntity implements UserInterface, PasswordAuthenticatedUserInterface
{
/**
* Administrátor
*/
const ROLE_ADMIN = 'ROLE_ADMIN';
/**
* Role Obchodník
*/
const ROLE_MERCHANT = 'ROLE_MERCHANT';
/**
* Role Zákazník
*/
const ROLE_CUSTOMER = 'ROLE_CUSTOMER';
/**
* Správce firmy
*/
const ROLE_COMPANY_ADMIN = 'ROLE_COMPANY_ADMIN';
/**
* Pracovník firmy
*/
const ROLE_COMPANY_USER = 'ROLE_COMPANY_USER';
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=180, unique=true)
*/
private $email;
/**
* @ORM\Column(type="json")
*/
private $roles = [];
/**
* @var string The hashed password
* @ORM\Column(type="string")
*/
private $password;
/**
* @ORM\Column(type="boolean")
*/
private $isVerified = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $active;
/**
* @ORM\Column(type="string", length=8, nullable=true)
*/
private $code;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $provision;
/**
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $surname;
/**
* @ORM\Column(type="string", length=3, nullable=true)
*/
private $personType;
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private $nationality;
/**
* @ORM\Column(type="string", length=4, nullable=true)
*/
private $taxResidency;
/**
* @ORM\Column(type="string", length=512, nullable=true)
*/
private $address;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $street;
/**
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $town;
/**
* @ORM\Column(type="string", length=6, nullable=true)
*/
private $postal;
/**
* @ORM\Column(type="string", length=512, nullable=true)
*/
private $address2;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $street2;
/**
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $town2;
/**
* @ORM\Column(type="string", length=6, nullable=true)
*/
private $postal2;
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private $ic;
/**
* @ORM\Column(type="string", length=36, nullable=true)
*/
private $dic;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $birthdate;
/**
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $bankName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $bankAccount;
/**
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $swift;
/**
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $iban;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $notes;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $idType;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $idNumber;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $idAuthor;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $idValidity;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $businessmanRegistrationPlace;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $businessmanRegistrationNumber;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $companyRegistrationPlace;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $companyRegistrationNumber;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $companyRegistrationPartition;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $companyRegistrationInsertion;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $companyRepresentantive;
/**
* @ORM\OneToMany(targetEntity=Order::class, mappedBy="user")
*/
private $orders;
/**
* @ORM\ManyToOne(targetEntity=Company::class, inversedBy="users")
*/
private $company;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
/**
* @ORM\Column(type="string", length=6, nullable=true)
*/
private $bankCode;
/**
* @ORM\OneToMany(targetEntity=UserRelation::class, mappedBy="junior", fetch="EXTRA_LAZY")
*/
private $bosses;
/**
* @ORM\OneToMany(targetEntity=UserRelation::class, mappedBy="boss", fetch="EXTRA_LAZY")
*/
private $juniors;
/**
* @ORM\OneToMany(targetEntity=InvoiceAutomation::class, mappedBy="merchant")
*/
private $invoices;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $invoiceAutomation = true;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $bankNameEur;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $bankAccountEur;
/**
* @ORM\Column(type="string", length=6, nullable=true)
*/
private $bankCodeEur;
/**
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $ibanEur;
/**
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $swiftEur;
/**
* @ORM\OneToMany(targetEntity=InvoiceAutomationExpand::class, mappedBy="user")
*/
private $invoiceAutomationExpands;
/**
* @ORM\OneToMany(targetEntity=InterestPaidoff::class, mappedBy="createdBy")
*/
private $interestPaidoffs;
/**
* @ORM\OneToMany(targetEntity=InterestPaidoffReport::class, mappedBy="createdBy")
*/
private $interestPaidoffReports;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $anonymize = 0;
/**
* @ORM\Column(type="string", length=3, nullable=true)
*/
private $tipster;
public function __construct()
{
$this->orders = new ArrayCollection();
$this->bosses = new ArrayCollection();
$this->juniors = new ArrayCollection();
$this->invoices = new ArrayCollection();
$this->invoiceAutomationExpands = new ArrayCollection();
$this->interestPaidoffs = new ArrayCollection();
$this->interestPaidoffReports = new ArrayCollection();
}
/**
* @return string (ID:{$this->getId()}) {$this->getUsername()}
*/
public function __toString(): string
{
return "(ID:{$this->getId()}) {$this->getUsername()}";
}
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return string|null
*/
public function getEmail(): ?string
{
return $this->email;
}
/**
* @param string $email
* @return $this
*/
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUserIdentifier(): string
{
return (string)$this->email;
}
/**
* @deprecated since Symfony 5.3, use getUserIdentifier instead
*/
public function getUsername(): string
{
return (string)$this->email;
}
/**
* @see UserInterface
*/
public function getRoles(): array
{
$roles = $this->roles;
// guarantee every user at least has ROLE_USER
//$roles[] = 'ROLE_CUSTOMER';
return array_unique($roles);
}
/**
* @param $role
* @return bool
*/
public function hasRole($role){
return in_array($role, $this->roles);
}
/**
* @param $role
* @return bool
*/
public function revokeRole($role){
unset($this->roles[$role]);
return true;
}
/**
* @param array $roles
* @return $this
*/
public function setRoles(array $roles): self
{
$this->roles = $roles;
return $this;
}
/**
* @see PasswordAuthenticatedUserInterface
*/
public function getPassword(): string
{
return $this->password;
}
/**
* @param string $password
* @return $this
*/
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
/**
* Returning a salt is only needed, if you are not using a modern
* hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
*
* @see UserInterface
*/
public function getSalt(): ?string
{
return null;
}
/**
* @see UserInterface
*/
public function eraseCredentials()
{
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
/**
* @return bool
*/
public function isVerified(): bool
{
return $this->isVerified;
}
/**
* @param bool $isVerified
* @return $this
*/
public function setIsVerified(bool $isVerified): self
{
$this->isVerified = $isVerified;
return $this;
}
/**
* @return bool|null
*/
public function isActive(): ?bool
{
return $this->active;
}
/**
* @param bool|null $active
* @return $this
*/
public function setActive(?bool $active): self
{
$this->active = $active;
return $this;
}
/**
* @return string|null
*/
public function getCode(): ?string
{
return $this->code;
}
/**
* @param string|null $code
* @return $this
*/
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
/**
* @return int|null
*/
public function getProvision(): ?int
{
return $this->provision;
}
/**
* @param int|null $provision
* @return $this
*/
public function setProvision(?int $provision): self
{
$this->provision = $provision;
return $this;
}
/**
* @return string|null
*/
public function getName(): ?string
{
return $this->name;
}
/**
* @param string|null $name
* @return $this
*/
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
/**
* @return string|null
*/
public function getSurname(): ?string
{
return $this->surname;
}
/**
* @param string|null $surname
* @return $this
*/
public function setSurname(?string $surname): self
{
$this->surname = $surname;
return $this;
}
/**
* @return string|null
*/
public function getPersonType(): ?string
{
return $this->personType;
}
/**
* @param string|null $personType
* @return $this
*/
public function setPersonType(?string $personType): self
{
$this->personType = $personType;
return $this;
}
/**
* @return string|null
*/
public function getNationality(): ?string
{
return $this->nationality;
}
/**
* @param string|null $nationality
* @return $this
*/
public function setNationality(?string $nationality): self
{
$this->nationality = $nationality;
return $this;
}
/**
* @return string|null
*/
public function getTaxResidency(): ?string
{
return $this->taxResidency;
}
/**
* @param string|null $taxResidency
* @return $this
*/
public function setTaxResidency(?string $taxResidency): self
{
$this->taxResidency = $taxResidency;
return $this;
}
/**
* @return string|null
*/
public function getAddress(): ?string
{
if (is_null($this->address)) {
return
trim($this->getStreet() . ", " .
$this->getTown() . ", " .
$this->getPostal(), ", ");
}
return $this->address;
}
/**
* @param string|null $address
* @return $this
*/
public function setAddress(?string $address): self
{
$this->address = $address;
return $this;
}
/**
* @return string|null
*/
public function getStreet(): ?string
{
return $this->street;
}
/**
* @param string|null $street
* @return $this
*/
public function setStreet(?string $street): self
{
$this->street = $street;
return $this;
}
/**
* @return string|null
*/
public function getTown(): ?string
{
return $this->town;
}
/**
* @param string|null $town
* @return $this
*/
public function setTown(?string $town): self
{
$this->town = $town;
return $this;
}
/**
* @return string|null
*/
public function getPostal(): ?string
{
return $this->postal;
}
/**
* @param string|null $postal
* @return $this
*/
public function setPostal(?string $postal): self
{
$this->postal = $postal;
return $this;
}
/**
* @return string|null
*/
public function getAddress2(): ?string
{
if (is_null($this->address2)) {
return
trim($this->getStreet2() . ", " .
$this->getTown2() . ", " .
$this->getPostal2(), ", ");
}
return $this->address2;
}
/**
* @param string|null $address
* @return $this
*/
public function setAddress2(?string $address): self
{
$this->address2 = $address;
return $this;
}
/**
* @return string|null
*/
public function getStreet2(): ?string
{
return $this->street2;
}
/**
* @param string|null $street
* @return $this
*/
public function setStreet2(?string $street): self
{
$this->street2 = $street;
return $this;
}
/**
* @return string|null
*/
public function getTown2(): ?string
{
return $this->town2;
}
/**
* @param string|null $town
* @return $this
*/
public function setTown2(?string $town): self
{
$this->town2 = $town;
return $this;
}
/**
* @return string|null
*/
public function getPostal2(): ?string
{
return $this->postal2;
}
/**
* @param string|null $postal
* @return $this
*/
public function setPostal2(?string $postal): self
{
$this->postal2 = $postal;
return $this;
}
/**
* @return string|null
*/
public function getIc(): ?string
{
return $this->ic;
}
/**
* @param string|null $ic
* @return $this
*/
public function setIc(?string $ic): self
{
$this->ic = $ic;
return $this;
}
/**
* @return string|null
*/
public function getDic(): ?string
{
return $this->dic;
}
/**
* @param string|null $dic
* @return $this
*/
public function setDic(?string $dic): self
{
$this->dic = $dic;
return $this;
}
/**
* @return \DateTimeInterface|null
*/
public function getBirthdate(): ?\DateTimeInterface
{
return $this->birthdate;
}
/**
* @param \DateTimeInterface|null $birthdate
* @return $this
*/
public function setBirthdate(?\DateTimeInterface $birthdate): self
{
$this->birthdate = $birthdate;
return $this;
}
/**
* @return string|null
*/
public function getPhone(): ?string
{
return $this->phone;
}
/**
* @param string|null $phone
* @return $this
*/
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
/**
* @return string|null
*/
public function getBankName(): ?string
{
return $this->bankName;
}
/**
* @param string|null $bankName
* @return $this
*/
public function setBankName(?string $bankName): self
{
$this->bankName = $bankName;
return $this;
}
/**
* @return string|null
*/
public function getBankAccount(): ?string
{
return $this->bankAccount;
}
/**
* @param string|null $bankAccount
* @return $this
*/
public function setBankAccount(?string $bankAccount): self
{
$this->bankAccount = $bankAccount;
return $this;
}
/**
* @return string|null
*/
public function getSwift(): ?string
{
return $this->swift;
}
/**
* @param string|null $swift
* @return $this
*/
public function setSwift(?string $swift): self
{
$this->swift = $swift;
return $this;
}
/**
* @return string|null
*/
public function getIban(): ?string
{
return $this->iban;
}
/**
* @param string|null $iban
* @return $this
*/
public function setIban(?string $iban): self
{
$this->iban = $iban;
return $this;
}
/**
* @return string|null
*/
public function getNotes(): ?string
{
return $this->notes;
}
/**
* @param string|null $notes
* @return $this
*/
public function setNotes(?string $notes): self
{
$this->notes = $notes;
return $this;
}
/**
* @return string|null
*/
public function getIdType(): ?string
{
return $this->idType;
}
/**
* @param string|null $idType
* @return $this
*/
public function setIdType(?string $idType): self
{
$this->idType = $idType;
return $this;
}
/**
* @return string|null
*/
public function getIdNumber(): ?string
{
return $this->idNumber;
}
/**
* @param string|null $idNumber
* @return $this
*/
public function setIdNumber(?string $idNumber): self
{
$this->idNumber = $idNumber;
return $this;
}
/**
* @return string|null
*/
public function getIdAuthor(): ?string
{
return $this->idAuthor;
}
/**
* @param string|null $idAuthor
* @return $this
*/
public function setIdAuthor(?string $idAuthor): self
{
$this->idAuthor = $idAuthor;
return $this;
}
/**
* @return \DateTimeInterface|null
*/
public function getIdValidity(): ?\DateTimeInterface
{
return $this->idValidity;
}
/**
* @param \DateTimeInterface|null $idValidity
* @return $this
*/
public function setIdValidity(?\DateTimeInterface $idValidity): self
{
$this->idValidity = $idValidity;
return $this;
}
/**
* @return string|null
*/
public function getBusinessmanRegistrationPlace(): ?string
{
return $this->businessmanRegistrationPlace;
}
/**
* @param string|null $businessmanRegistrationPlace
* @return $this
*/
public function setBusinessmanRegistrationPlace(?string $businessmanRegistrationPlace): self
{
$this->businessmanRegistrationPlace = $businessmanRegistrationPlace;
return $this;
}
/**
* @return string|null
*/
public function getBusinessmanRegistrationNumber(): ?string
{
return $this->businessmanRegistrationNumber;
}
/**
* @param string|null $businessmanRegistrationNumber
* @return $this
*/
public function setBusinessmanRegistrationNumber(?string $businessmanRegistrationNumber): self
{
$this->businessmanRegistrationNumber = $businessmanRegistrationNumber;
return $this;
}
/**
* @return string|null
*/
public function getCompanyRegistrationPlace(): ?string
{
return $this->companyRegistrationPlace;
}
/**
* @param string|null $companyRegistrationPlace
* @return $this
*/
public function setCompanyRegistrationPlace(?string $companyRegistrationPlace): self
{
$this->companyRegistrationPlace = $companyRegistrationPlace;
return $this;
}
/**
* @return string|null
*/
public function getCompanyRegistrationNumber(): ?string
{
return $this->companyRegistrationNumber;
}
/**
* @param string|null $companyRegistrationNumber
* @return $this
*/
public function setCompanyRegistrationNumber(?string $companyRegistrationNumber): self
{
$this->companyRegistrationNumber = $companyRegistrationNumber;
return $this;
}
/**
* @return string|null
*/
public function getCompanyRegistrationPartition(): ?string
{
return $this->companyRegistrationPartition;
}
/**
* @param string|null $companyRegistrationPartition
* @return $this
*/
public function setCompanyRegistrationPartition(?string $companyRegistrationPartition): self
{
$this->companyRegistrationPartition = $companyRegistrationPartition;
return $this;
}
/**
* @return string|null
*/
public function getCompanyRegistrationInsertion(): ?string
{
return $this->companyRegistrationInsertion;
}
/**
* @param string|null $companyRegistrationInsertion
* @return $this
*/
public function setCompanyRegistrationInsertion(?string $companyRegistrationInsertion): self
{
$this->companyRegistrationInsertion = $companyRegistrationInsertion;
return $this;
}
/**
* @return string|null
*/
public function getCompanyRepresentantive(): ?string
{
return $this->companyRepresentantive;
}
/**
* @param string|null $companyRepresentantive
* @return $this
*/
public function setCompanyRepresentantive(?string $companyRepresentantive): self
{
$this->companyRepresentantive = $companyRepresentantive;
return $this;
}
/**
* @return Collection<int, Order>
*/
public function getOrders(): Collection
{
return $this->orders;
}
public function addOrder(Order $order): self
{
if (!$this->orders->contains($order)) {
$this->orders[] = $order;
$order->setUser($this);
}
return $this;
}
public function removeOrder(Order $order): self
{
if ($this->orders->removeElement($order)) {
// set the owning side to null (unless already changed)
if ($order->getUser() === $this) {
$order->setUser(null);
}
}
return $this;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getBankCode(): ?string
{
return $this->bankCode;
}
public function setBankCode(?string $bankCode): self
{
$this->bankCode = $bankCode;
return $this;
}
// public function getRelations(){
//
// }
// public function addRelation(){
//
// }
//
// public function removeRelation(){
//
// }
//
// public function getBosses(){
// $this->relations->filter(function(){
//
// });
// }
public function setBosses(Collection $bosses){
$this->bosses = $bosses;
}
/**
* @return Collection<int, UserRelation>
*/
public function getBosses($userRelation = UserRelation::TYPE_STRUCTURE): Collection
{
if(is_null($userRelation) == false
&& ($userRelation == UserRelation::TYPE_REWARD || $userRelation == UserRelation::TYPE_STRUCTURE)){
$filtered = $this->bosses->filter(function(UserRelation $relation) use ($userRelation){
return $relation->getRelationType() == $userRelation;
});
return $filtered;
}
return $this->bosses;
}
public function addBoss(UserRelation $boss): self
{
if (!$this->bosses->contains($boss)) {
$this->bosses[] = $boss;
$boss->setBoss($this);
}
return $this;
}
public function removeBoss(UserRelation $boss): self
{
if ($this->bosses->removeElement($boss)) {
// set the owning side to null (unless already changed)
if ($boss->getBoss() === $this) {
$boss->setBoss(null);
}
}
return $this;
}
/**
* @return Collection<int, UserRelation>
*/
public function getJuniors($kind = UserRelation::TYPE_STRUCTURE): Collection
{
if(is_null($kind) == false && ($kind == UserRelation::TYPE_REWARD || $kind == UserRelation::TYPE_STRUCTURE)){
$filtered = $this->juniors->filter(function(UserRelation $relation) use ($kind){
return $relation->getRelationType() == $kind;
});
return $filtered;
}
return $this->juniors;
}
public function addJunior(UserRelation $junior): self
{
if (!$this->juniors->contains($junior)) {
$this->juniors[] = $junior;
$junior->setJunior($this);
}
return $this;
}
public function removeJunior(UserRelation $junior): self
{
if ($this->juniors->removeElement($junior)) {
// set the owning side to null (unless already changed)
if ($junior->getJunior() === $this) {
$junior->setJunior(null);
}
}
return $this;
}
/**
* @return Collection<int, InterestPaidoff>
*/
public function getInterestPaidoffs(): Collection
{
return $this->interestPaidoffs;
}
public function addInterestPaidoff(InterestPaidoff $interestPaidoff): self
{
if (!$this->interestPaidoffs->contains($interestPaidoff)) {
$this->interestPaidoffs[] = $interestPaidoff;
$interestPaidoff->setCreatedBy($this);
}
return $this;
}
public function removeInterestPaidoff(InterestPaidoff $interestPaidoff): self
{
if ($this->interestPaidoffs->removeElement($interestPaidoff)) {
// set the owning side to null (unless already changed)
if ($interestPaidoff->getCreatedBy() === $this) {
$interestPaidoff->setCreatedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, InterestPaidoffReport>
*/
public function getInterestPaidoffReports(): Collection
{
return $this->interestPaidoffReports;
}
public function addInterestPaidoffReport(InterestPaidoffReport $interestPaidoffReport): self
{
if (!$this->interestPaidoffReports->contains($interestPaidoffReport)) {
$this->interestPaidoffReports[] = $interestPaidoffReport;
$interestPaidoffReport->setCreatedBy($this);
}
return $this;
}
public function removeInterestPaidoffReport(InterestPaidoffReport $interestPaidoffReport): self
{
if ($this->interestPaidoffReports->removeElement($interestPaidoffReport)) {
// set the owning side to null (unless already changed)
if ($interestPaidoffReport->getCreatedBy() === $this) {
$interestPaidoffReport->setCreatedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, InvoiceAutomation>
*/
public function getInvoices(): Collection
{
return $this->invoices;
}
public function addInvoice(InvoiceAutomation $invoice): self
{
if (!$this->invoices->contains($invoice)) {
$this->invoices[] = $invoice;
$invoice->setMerchant($this);
}
return $this;
}
public function removeInvoice(InvoiceAutomation $invoice): self
{
if ($this->invoices->removeElement($invoice)) {
// set the owning side to null (unless already changed)
if ($invoice->getMerchant() === $this) {
$invoice->setMerchant(null);
}
}
return $this;
}
public function isInvoiceAutomation(): ?bool
{
return (bool)$this->invoiceAutomation;
}
public function setInvoiceAutomation(?bool $invoiceAutomation): self
{
$this->invoiceAutomation = $invoiceAutomation;
return $this;
}
public function getBankNameEur(): ?string
{
return $this->bankNameEur;
}
public function setBankNameEur(?string $bankNameEur): self
{
$this->bankNameEur = $bankNameEur;
return $this;
}
public function getBankAccountEur(): ?string
{
return $this->bankAccountEur;
}
public function setBankAccountEur(?string $bankAccountEur): self
{
$this->bankAccountEur = $bankAccountEur;
return $this;
}
public function getBankCodeEur(): ?string
{
return $this->bankCodeEur;
}
public function setBankCodeEur(?string $bankCodeEur): self
{
$this->bankCodeEur = $bankCodeEur;
return $this;
}
public function getIbanEur(): ?string
{
return $this->ibanEur;
}
public function setIbanEur(?string $ibanEur): self
{
$this->ibanEur = $ibanEur;
return $this;
}
public function getSwiftEur(): ?string
{
return $this->swiftEur;
}
public function setSwiftEur(?string $swiftEur): self
{
$this->swiftEur = $swiftEur;
return $this;
}
/**
* @return Collection<int, InvoiceAutomationExpand>
*/
public function getInvoiceAutomationExpands(): Collection
{
return $this->invoiceAutomationExpands;
}
public function addInvoiceAutomationExpand(InvoiceAutomationExpand $invoiceAutomationExpand): self
{
if (!$this->invoiceAutomationExpands->contains($invoiceAutomationExpand)) {
$this->invoiceAutomationExpands[] = $invoiceAutomationExpand;
$invoiceAutomationExpand->setUser($this);
}
return $this;
}
public function removeInvoiceAutomationExpand(InvoiceAutomationExpand $invoiceAutomationExpand): self
{
if ($this->invoiceAutomationExpands->removeElement($invoiceAutomationExpand)) {
// set the owning side to null (unless already changed)
if ($invoiceAutomationExpand->getUser() === $this) {
$invoiceAutomationExpand->setUser(null);
}
}
return $this;
}
public function isAnonymize(): ?bool
{
return (bool)$this->anonymize;
}
public function setAnonymize(?bool $anonymize): self
{
$this->anonymize = $anonymize;
return $this;
}
public function getTipster(): ?int
{
return (int)$this->tipster;
}
public function setTipster(?string $tipster): self
{
$this->tipster = $tipster;
return $this;
}
}