src/Flexy/ShopBundle/Entity/Customer/Customer.php line 46
<?php
namespace App\Flexy\ShopBundle\Entity\Customer;
use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use App\Entity\User;
use App\Flexy\ShopBundle\Entity\Accounting\Invoice;
use App\Flexy\ShopBundle\Entity\Order\Order;
use App\Flexy\ShopBundle\Entity\Payment\BankBookItem;
use App\Flexy\ShopBundle\Entity\Order\TicketsCustomer;
use App\Flexy\ShopBundle\Entity\Product\Comment;
use App\Flexy\ShopBundle\Entity\Product\ProductSubscription;
use App\Flexy\ShopBundle\Entity\Promotion\Coupon;
use App\Flexy\ShopBundle\Entity\Shipping\CashOnDelivery;
use App\Flexy\ShopBundle\Entity\Shipping\CityRegion;
use App\Flexy\ShopBundle\Entity\Shipping\Shipment;
use App\Flexy\ShopBundle\Entity\Store\Store;
use App\Flexy\ShopBundle\Entity\Vendor\Vendor;
use App\Flexy\ShopBundle\Repository\Customer\CustomerRepository;
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\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Mapping\Annotation as Gedmo;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Symfony\Component\HttpFoundation\File\File;
/**
* @Vich\Uploadable
*/
#[ApiResource(
normalizationContext: ['groups' => ['read','readPackEngagements']],
denormalizationContext: ['groups' => ['write']],
)]
#[ApiFilter(SearchFilter::class, properties: ['user.googleId' => 'exact','user.facebookId' => 'exact'])]
#[ORM\Entity(repositoryClass: CustomerRepository::class)]
#[UniqueEntity(
fields: ['email'],
message: 'Ce compte déja existe.',
)]
#[Gedmo\SoftDeleteable(fieldName: 'deletedAt', timeAware: false, hardDelete: true)]
class Customer implements \Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
#[Groups(["read","write"])]
private $id;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $description = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: false, unique: true)]
#[Assert\Email]
#[Assert\NotNull]
#[Assert\NotBlank]
private ?string $email = null;
#[ORM\Column(type: 'datetime', nullable: true)]
private ?\DateTime $createdAt = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255)]
private ?string $firstName = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255)]
private ?string $lastName = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $address = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $city;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255)]
#[Assert\Regex(pattern: '/^[0-9]*$/', match: true, message: 'Veuillez entrer une numéro de téléphone valide(en chiffres)')]
#[Assert\Length(min: 10)]
private ?string $phone = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $companyName = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $addressIndication = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $country = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $postCode = null;
#[Groups(["read","write"])]
#[ORM\OneToMany(targetEntity: Order::class, mappedBy: 'customer', orphanRemoval: true, cascade: ['persist', 'remove'])]
private \Doctrine\Common\Collections\Collection|array $orders;
#[Groups(["read","write"])]
#[ORM\ManyToOne(targetEntity: CustomerGroup::class, inversedBy: 'customers', cascade: ['persist'])]
private ?\App\Flexy\ShopBundle\Entity\Customer\CustomerGroup $customerGroup = null;
#[Groups(["read","write"])]
#[ORM\OneToOne(targetEntity: User::class, orphanRemoval: true, cascade: ['persist', 'remove'])]
#[ApiFilter(SearchFilter::class, strategy: 'exact')]
private ?\App\Entity\User $user = null;
#[ORM\OneToMany(targetEntity: Comment::class, mappedBy: 'customer')]
private \Doctrine\Common\Collections\Collection|array $comments;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $gender = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'date', nullable: true)]
private ?\DateTimeInterface $dateOfBirth = null;
#[ORM\OneToMany(targetEntity: CustomerAddress::class, mappedBy: 'customer', cascade: ['persist', 'remove'])]
private \Doctrine\Common\Collections\Collection|array $customerAddresses;
#[ORM\OneToMany(targetEntity: CustomerWalletPoint::class, mappedBy: 'customer', orphanRemoval: true, cascade: ['persist', 'remove'])]
private \Doctrine\Common\Collections\Collection|array $customerWalletPoints;
#[ORM\ManyToOne(targetEntity: Vendor::class, inversedBy: 'customers')]
private ?\App\Flexy\ShopBundle\Entity\Vendor\Vendor $vendor = null;
#[ORM\ManyToOne(targetEntity: CityRegion::class)]
#[Groups(["read","write"])]
private $cityRegion;
#[ORM\OneToMany(targetEntity: PackEngagement::class, mappedBy: 'customer', cascade: ['remove'], orphanRemoval: true)]
private \Doctrine\Common\Collections\Collection|array $packEngagements;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $sponsorshipCode = null;
#[Groups(["read","write"])]
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $image = null;
#[ORM\ManyToMany(targetEntity: Coupon::class, mappedBy: 'allowedCustomers')]
private \Doctrine\Common\Collections\Collection|array $affectedCoupons;
#[ORM\OneToMany(targetEntity: Coupon::class, mappedBy: 'onlyThisCustomer')]
private \Doctrine\Common\Collections\Collection|array $affectedCouponsOnlyForMe;
#[Groups(["read","write"])]
#[ORM\Column(type: 'boolean', nullable: true)]
private $canReceiveMails;
#[Groups(["read","write"])]
#[ORM\Column(type: 'boolean', nullable: true)]
private $canReceiveSms;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $blindPassword;
#[ORM\Column(nullable: true)]
private ?\DateTimeImmutable $deletedAt = null;
#[ORM\OneToMany(mappedBy: 'senderCustomer', targetEntity: Shipment::class)]
private Collection $sentShipments;
#[ORM\OneToMany(mappedBy: 'recipientCustomer', targetEntity: Shipment::class)]
private Collection $receivedShipments;
#[ORM\OneToMany(mappedBy: 'customer', targetEntity: BankBookItem::class)]
private Collection $bankBookItems;
#[ORM\OneToMany(mappedBy: 'customer', targetEntity: CashOnDelivery::class)]
private Collection $cashOnDeliveries;
#[ORM\OneToMany(mappedBy: 'customer', targetEntity: ProductSubscription::class)]
#[Groups(["read","write"])]
private Collection $productSubscriptions;
#[Groups(["read","write"])]
#[ORM\ManyToOne(inversedBy: 'customers')]
private ?Store $store = null;
#[ORM\OneToMany(mappedBy: 'customer', targetEntity: Invoice::class)]
private Collection $invoices;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(["read","write"])]
private ?string $collectAddress = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(["read","write"])]
private ?string $shippingAddress = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(["read","write"])]
private ?string $collectLat = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(["read","write"])]
private ?string $collectLng = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(["read","write"])]
private ?string $shippingLng = null;
#[ORM\OneToMany(mappedBy: 'customer', targetEntity: Complaint::class)]
#[Groups(["read","write"])]
private Collection $complaints;
/**
* @Vich\UploadableField(mapping="join_images", fileNameProperty="pathRCImage")
*/
private ?\Symfony\Component\HttpFoundation\File\File $imageRCFile = null;
/**
* @Vich\UploadableField(mapping="join_images", fileNameProperty="pathIFImage")
*/
private ?\Symfony\Component\HttpFoundation\File\File $imageIFFile = null;
/**
* @Vich\UploadableField(mapping="join_images", fileNameProperty="pathCinRectoImage")
*/
private ?\Symfony\Component\HttpFoundation\File\File $imageCinRecto = null;
/**
* @Vich\UploadableField(mapping="join_images", fileNameProperty="pathCinVersoImage")
*/
private ?\Symfony\Component\HttpFoundation\File\File $imageCinVerso = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $pathRCImage = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $pathIFImage = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $pathCinRectoImage = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $pathCinVersoImage = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Raison_sociale = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Ice = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Adresse = null;
#[ORM\OneToMany(mappedBy: 'user_id', targetEntity: TicketsCustomer::class)]
private Collection $ticketsCustomers;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Sector_activity = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $job = null;
#[ORM\Column(type: 'boolean', nullable: true)]
private $can_accept_community ;
public function __construct()
{
$this->sentShipments = new ArrayCollection();
$this->receivedShipments = new ArrayCollection();
$this->bankBookItems = new ArrayCollection();
$this->cashOnDeliveries = new ArrayCollection();
$this->productSubscriptions = new ArrayCollection();
$this->invoices = new ArrayCollection();
$this->customerWalletPoints = new ArrayCollection();
$this->createdAt = new \DateTime();
$this->complaints = new ArrayCollection();
$this->ticketsCustomers = new ArrayCollection();
}
public function __toString(): string
{
return $this->firstName." ".$this->lastName;
}
public function getId(): ?int
{
return $this->id;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getCreatedAt(): ?\DateTime
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTime $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(string $firstName): self
{
$this->firstName = $firstName;
return $this;
}
public function setImageRCFile(File $path = null)
{
$this->imageRCFile = $path;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
}
public function getImageRCFile()
{
return $this->imageRCFile;
}
public function getPathRCImage(): ?string
{
return $this->pathRCImage;
}
public function setPathRCImage(?string $pathRCImage): self
{
$this->pathRCImage = $pathRCImage;
return $this;
}
public function getPathIFImage(): ?string
{
return $this->pathIFImage;
}
public function setPathIFImage(?string $pathIFImage): self
{
$this->pathIFImage = $pathIFImage;
return $this;
}
public function getPathCinRectoImage(): ?string
{
return $this->pathCinRectoImage;
}
public function setPathCinRectoImage(?string $pathCinRectoImage): self
{
$this->pathCinRectoImage = $pathCinRectoImage;
return $this;
}
public function getPathCinVersoImage(): ?string
{
return $this->pathCinVersoImage;
}
public function setPathCinVersoImage(?string $pathCinVersoImage): self
{
$this->pathCinVersoImage = $pathCinVersoImage;
return $this;
}
public function setImageIFFile(File $path = null)
{
$this->imageIFFile = $path;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
}
public function getImageIFFile()
{
return $this->imageIFFile;
}
public function setImageCinRecto(File $path = null)
{
$this->imageCinRecto = $path;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
}
public function getImageCinRecto()
{
return $this->imageCinRecto;
}
public function setImageCinVerso(File $path = null)
{
$this->imageCinVerso = $path;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
}
public function getImageCinVerso()
{
return $this->imageCinVerso;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(string $lastName): self
{
$this->lastName = $lastName;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(?string $address): self
{
$this->address = $address;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getCompanyName(): ?string
{
return $this->companyName;
}
public function setCompanyName(?string $companyName): self
{
$this->companyName = $companyName;
return $this;
}
public function getAddressIndication(): ?string
{
return $this->addressIndication;
}
public function setAddressIndication(?string $addressIndication): self
{
$this->addressIndication = $addressIndication;
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): self
{
$this->country = $country;
return $this;
}
public function getPostCode(): ?string
{
return $this->postCode;
}
public function setPostCode(string $postCode): self
{
$this->postCode = $postCode;
return $this;
}
/**
* @return Collection|Order[]
*/
public function getOrders(): Collection
{
return $this->orders;
}
public function addOrder(Order $order): self
{
if (!$this->orders->contains($order)) {
$this->orders[] = $order;
$order->setCustomer($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->getCustomer() === $this) {
$order->setCustomer(null);
}
}
return $this;
}
public function getCustomerGroup(): ?CustomerGroup
{
return $this->customerGroup;
}
public function setCustomerGroup(?CustomerGroup $customerGroup): self
{
$this->customerGroup = $customerGroup;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
/**
* @return Collection|Comment[]
*/
public function getComments(): Collection
{
return $this->comments;
}
public function addComment(Comment $comment): self
{
if (!$this->comments->contains($comment)) {
$this->comments[] = $comment;
$comment->setCustomer($this);
}
return $this;
}
public function removeComment(Comment $comment): self
{
if ($this->comments->removeElement($comment)) {
// set the owning side to null (unless already changed)
if ($comment->getCustomer() === $this) {
$comment->setCustomer(null);
}
}
return $this;
}
public function getGender(): ?string
{
return $this->gender;
}
public function setGender(?string $gender): self
{
$this->gender = $gender;
return $this;
}
public function getDateOfBirth(): ?\DateTimeInterface
{
return $this->dateOfBirth;
}
public function setDateOfBirth(?\DateTimeInterface $dateOfBirth): self
{
$this->dateOfBirth = $dateOfBirth;
return $this;
}
/**
* @return Collection<int, CustomerAddress>
*/
public function getCustomerAddresses(): Collection
{
return $this->customerAddresses;
}
public function addCustomerAddress(CustomerAddress $customerAddress): self
{
if (!$this->customerAddresses->contains($customerAddress)) {
$this->customerAddresses[] = $customerAddress;
$customerAddress->setCustomer($this);
}
return $this;
}
public function removeCustomerAddress(CustomerAddress $customerAddress): self
{
if ($this->customerAddresses->removeElement($customerAddress)) {
// set the owning side to null (unless already changed)
if ($customerAddress->getCustomer() === $this) {
$customerAddress->setCustomer(null);
}
}
return $this;
}
/**
* @return Collection<int, CustomerWalletPoint>
*/
public function getCustomerWalletPoints(): Collection
{
return $this->customerWalletPoints;
}
public function addCustomerWalletPoint(CustomerWalletPoint $customerWalletPoint): self
{
if (!$this->customerWalletPoints->contains($customerWalletPoint)) {
$this->customerWalletPoints[] = $customerWalletPoint;
$customerWalletPoint->setCustomer($this);
}
return $this;
}
public function removeCustomerWalletPoint(CustomerWalletPoint $customerWalletPoint): self
{
if ($this->customerWalletPoints->removeElement($customerWalletPoint)) {
// set the owning side to null (unless already changed)
if ($customerWalletPoint->getCustomer() === $this) {
$customerWalletPoint->setCustomer(null);
}
}
return $this;
}
#[Groups(["read","write"])]
public function getCredit(){
$credit = 0;
foreach($this->getCustomerWalletPoints() as $singleWalletPoint){
$credit = $credit + $singleWalletPoint->getPoints();
}
return $credit;
}
public function getVendor(): ?Vendor
{
return $this->vendor;
}
public function setVendor(?Vendor $vendor): self
{
$this->vendor = $vendor;
return $this;
}
/**
* @return Collection<int, PackEngagement>
*/
public function getPackEngagements(): Collection
{
return $this->packEngagements;
}
public function addPackEngagement(PackEngagement $packEngagement): self
{
if (!$this->packEngagements->contains($packEngagement)) {
$this->packEngagements[] = $packEngagement;
$packEngagement->setCustomer($this);
}
return $this;
}
public function removePackEngagement(PackEngagement $packEngagement): self
{
if ($this->packEngagements->removeElement($packEngagement)) {
// set the owning side to null (unless already changed)
if ($packEngagement->getCustomer() === $this) {
$packEngagement->setCustomer(null);
}
}
return $this;
}
public function getSponsorshipCode(): ?string
{
return $this->sponsorshipCode;
}
public function setSponsorshipCode(?string $sponsorshipCode): self
{
$this->sponsorshipCode = $sponsorshipCode;
return $this;
}
public function getMySponsorshipCode(){
return "PRN0000".$this->getId();
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(?string $image): self
{
$this->image = $image;
return $this;
}
/**
* @return Collection<int, Coupon>
*/
public function getAffectedCoupons(): Collection
{
return $this->affectedCoupons;
}
public function addAffectedCoupon(Coupon $affectedCoupon): self
{
if (!$this->affectedCoupons->contains($affectedCoupon)) {
$this->affectedCoupons[] = $affectedCoupon;
$affectedCoupon->addAllowedCustomer($this);
}
return $this;
}
public function removeAffectedCoupon(Coupon $affectedCoupon): self
{
if ($this->affectedCoupons->removeElement($affectedCoupon)) {
$affectedCoupon->removeAllowedCustomer($this);
}
return $this;
}
/**
* @return Collection<int, Coupon>
*/
public function getAffectedCouponsOnlyForMe(): Collection
{
return $this->affectedCouponsOnlyForMe;
}
public function addAffectedCouponsOnlyForMe(Coupon $affectedCouponsOnlyForMe): self
{
if (!$this->affectedCouponsOnlyForMe->contains($affectedCouponsOnlyForMe)) {
$this->affectedCouponsOnlyForMe[] = $affectedCouponsOnlyForMe;
$affectedCouponsOnlyForMe->setOnlyThisCustomer($this);
}
return $this;
}
public function removeAffectedCouponsOnlyForMe(Coupon $affectedCouponsOnlyForMe): self
{
if ($this->affectedCouponsOnlyForMe->removeElement($affectedCouponsOnlyForMe)) {
// set the owning side to null (unless already changed)
if ($affectedCouponsOnlyForMe->getOnlyThisCustomer() === $this) {
$affectedCouponsOnlyForMe->setOnlyThisCustomer(null);
}
}
return $this;
}
/**
* Get the value of canReceiveMails
*/
public function getCanReceiveMails()
{
return $this->canReceiveMails;
}
/**
* Set the value of canReceiveMails
*
* @return self
*/
public function setCanReceiveMails($canReceiveMails)
{
$this->canReceiveMails = $canReceiveMails;
return $this;
}
/**
* Get the value of canReceiveSms
*/
public function getCanReceiveSms()
{
return $this->canReceiveSms;
}
/**
* Set the value of canReceiveSms
*
* @return self
*/
public function setCanReceiveSms($canReceiveSms)
{
$this->canReceiveSms = $canReceiveSms;
return $this;
}
/**
* Get the value of blindPassword
*/
public function getBlindPassword()
{
return $this->blindPassword;
}
/**
* Set the value of blindPassword
*
* @return self
*/
public function setBlindPassword($blindPassword)
{
$this->blindPassword = $blindPassword;
return $this;
}
/**
* Get the value of city
*/
public function getCity()
{
return $this->city;
}
/**
* Set the value of city
*
* @return self
*/
public function setCity($city)
{
$this->city = $city;
return $this;
}
/**
* Get the value of cityRegion
*/
public function getCityRegion()
{
return $this->cityRegion;
}
/**
* Set the value of cityRegion
*
* @return self
*/
public function setCityRegion($cityRegion)
{
$this->cityRegion = $cityRegion;
return $this;
}
public function getDeletedAt(): ?\DateTimeImmutable
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeImmutable $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
/**
* @return Collection<int, Shipment>
*/
public function getSentShipments(): Collection
{
return $this->sentShipments;
}
public function addSentShipment(Shipment $sentShipment): self
{
if (!$this->sentShipments->contains($sentShipment)) {
$this->sentShipments->add($sentShipment);
$sentShipment->setSenderCustomer($this);
}
return $this;
}
public function removeSentShipment(Shipment $sentShipment): self
{
if ($this->sentShipments->removeElement($sentShipment)) {
// set the owning side to null (unless already changed)
if ($sentShipment->getSenderCustomer() === $this) {
$sentShipment->setSenderCustomer(null);
}
}
return $this;
}
/**
* @return Collection<int, Shipment>
*/
public function getReceivedShipments(): Collection
{
return $this->receivedShipments;
}
public function addReceivedShipment(Shipment $receivedShipment): self
{
if (!$this->receivedShipments->contains($receivedShipment)) {
$this->receivedShipments->add($receivedShipment);
$receivedShipment->setRecipientCustomer($this);
}
return $this;
}
public function removeReceivedShipment(Shipment $receivedShipment): self
{
if ($this->receivedShipments->removeElement($receivedShipment)) {
// set the owning side to null (unless already changed)
if ($receivedShipment->getRecipientCustomer() === $this) {
$receivedShipment->setRecipientCustomer(null);
}
}
return $this;
}
/**
* @return Collection<int, BankBookItem>
*/
public function getBankBookItems(): Collection
{
return $this->bankBookItems;
}
public function addBankBookItem(BankBookItem $bankBookItem): self
{
if (!$this->bankBookItems->contains($bankBookItem)) {
$this->bankBookItems->add($bankBookItem);
$bankBookItem->setCustomer($this);
}
return $this;
}
public function removeBankBookItem(BankBookItem $bankBookItem): self
{
if ($this->bankBookItems->removeElement($bankBookItem)) {
// set the owning side to null (unless already changed)
if ($bankBookItem->getCustomer() === $this) {
$bankBookItem->setCustomer(null);
}
}
return $this;
}
/**
* @return Collection<int, CashOnDelivery>
*/
public function getCashOnDeliveries(): Collection
{
return $this->cashOnDeliveries;
}
public function addCashOnDelivery(CashOnDelivery $cashOnDelivery): self
{
if (!$this->cashOnDeliveries->contains($cashOnDelivery)) {
$this->cashOnDeliveries->add($cashOnDelivery);
$cashOnDelivery->setCustomer($this);
}
return $this;
}
public function removeCashOnDelivery(CashOnDelivery $cashOnDelivery): self
{
if ($this->cashOnDeliveries->removeElement($cashOnDelivery)) {
// set the owning side to null (unless already changed)
if ($cashOnDelivery->getCustomer() === $this) {
$cashOnDelivery->setCustomer(null);
}
}
return $this;
}
/**
* @return Collection<int, ProductSubscription>
*/
public function getProductSubscriptions(): Collection
{
return $this->productSubscriptions;
}
public function addProductSubscription(ProductSubscription $productSubscription): self
{
if (!$this->productSubscriptions->contains($productSubscription)) {
$this->productSubscriptions->add($productSubscription);
$productSubscription->setCustomer($this);
}
return $this;
}
public function removeProductSubscription(ProductSubscription $productSubscription): self
{
if ($this->productSubscriptions->removeElement($productSubscription)) {
// set the owning side to null (unless already changed)
if ($productSubscription->getCustomer() === $this) {
$productSubscription->setCustomer(null);
}
}
return $this;
}
public function getStore(): ?Store
{
return $this->store;
}
public function setStore(?Store $store): self
{
$this->store = $store;
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->setCustomer($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->getCustomer() === $this) {
$invoice->setCustomer(null);
}
}
return $this;
}
public function getCollectAddress(): ?string
{
return $this->collectAddress;
}
public function setCollectAddress(?string $collectAddress): self
{
$this->collectAddress = $collectAddress;
return $this;
}
public function getShippingAddress(): ?string
{
return $this->shippingAddress;
}
public function setShippingAddress(?string $shippingAddress): self
{
$this->shippingAddress = $shippingAddress;
return $this;
}
public function getCollectLat(): ?string
{
return $this->collectLat;
}
public function setCollectLat(?string $collectLat): self
{
$this->collectLat = $collectLat;
return $this;
}
public function getCollectLng(): ?string
{
return $this->collectLng;
}
public function setCollectLng(string $collectLng): self
{
$this->collectLng = $collectLng;
return $this;
}
public function getShippingLng(): ?string
{
return $this->shippingLng;
}
public function setShippingLng(?string $shippingLng): self
{
$this->shippingLng = $shippingLng;
return $this;
}
/**
* @return Collection<int, Complaint>
*/
public function getComplaints(): Collection
{
return $this->complaints;
}
public function addComplaint(Complaint $complaint): self
{
if (!$this->complaints->contains($complaint)) {
$this->complaints->add($complaint);
$complaint->setCustomer($this);
}
return $this;
}
public function removeComplaint(Complaint $complaint): self
{
if ($this->complaints->removeElement($complaint)) {
// set the owning side to null (unless already changed)
if ($complaint->getCustomer() === $this) {
$complaint->setCustomer(null);
}
}
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): static
{
$this->type = $type;
return $this;
}
public function getRaisonSociale(): ?string
{
return $this->Raison_sociale;
}
public function setRaisonSociale(?string $Raison_sociale): static
{
$this->Raison_sociale = $Raison_sociale;
return $this;
}
public function getIce(): ?string
{
return $this->Ice;
}
public function setIce(?string $Ice): static
{
$this->Ice = $Ice;
return $this;
}
public function getAdresse(): ?string
{
return $this->Adresse;
}
public function setAdresse(?string $Adresse): static
{
$this->Adresse = $Adresse;
return $this;
}
/**
* @return Collection<int, TicketsCustomer>
*/
public function getTicketsCustomers(): Collection
{
return $this->ticketsCustomers;
}
public function addTicketsCustomer(TicketsCustomer $ticketsCustomer): static
{
if (!$this->ticketsCustomers->contains($ticketsCustomer)) {
$this->ticketsCustomers->add($ticketsCustomer);
$ticketsCustomer->setUserId($this);
}
return $this;
}
public function removeTicketsCustomer(TicketsCustomer $ticketsCustomer): static
{
if ($this->ticketsCustomers->removeElement($ticketsCustomer)) {
// set the owning side to null (unless already changed)
if ($ticketsCustomer->getUserId() === $this) {
$ticketsCustomer->setUserId(null);
}
}
return $this;
}
public function getSectorActivity(): ?string
{
return $this->Sector_activity;
}
public function setSectorActivity(?string $Sector_activity): static
{
$this->Sector_activity = $Sector_activity;
return $this;
}
public function getJob(): ?string
{
return $this->job;
}
public function setJob(?string $job): static
{
$this->job = $job;
return $this;
}
/**
* Get the value of canReceiveSms
*/
public function getCanAcceptCommunity()
{
return $this->can_accept_community;
}
/**
* Set the value of canReceiveSms
*
* @return self
*/
public function setCanAcceptCommunity($can_accept_community)
{
$this->can_accept_community = $can_accept_community;
return $this;
}
}