<?phpdeclare(strict_types=1);namespace BitBag\OpenMarketplace\Component\RFQCategory\Entity;use BitBag\OpenMarketplace\Component\Organization\Entity\OrganizationInterface;use BitBag\OpenMarketplace\Component\RFQCategory\StateMachine\CRFQStates;use BitBag\OpenMarketplace\Component\Taxonomy\Entity\TaxonInterface;use DateTimeInterface;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Sylius\Component\Addressing\Model\CountryInterface;use Sylius\Component\Resource\Model\TimestampableTrait;class CRFQ implements CRFQInterface{ use TimestampableTrait; private ?int $id = null; private ?int $quantity = null; private ?string $approvalStatus = CRFQStates::APPROVAL_STATUS_NEW; private ?string $subject = 'Request for quote'; private ?string $details = null; private ?string $revisionReason = null; protected ?DateTimeInterface $revisionDate; private ?string $rejectedReason = null; protected ?DateTimeInterface $rejectedDate; protected ?DateTimeInterface $deliveryDate; protected ?DateTimeInterface $offerDeliveryDate; private ?OrganizationInterface $buyer; private ?TaxonInterface $category; private ?CountryInterface $country; private Collection $selectedCountries; private Collection $selectedSellers; private Collection $sellersCRFQ; private Collection $attachments; public function __construct() { $this->attachments = new ArrayCollection(); $this->sellersCRFQ = new ArrayCollection(); $this->selectedSellers = new ArrayCollection(); $this->selectedCountries = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getQuantity(): ?int { return $this->quantity; } public function setQuantity(?int $quantity): void { $this->quantity = $quantity; } public function getBuyer(): ?OrganizationInterface { return $this->buyer; } public function setBuyer(OrganizationInterface $buyer): void { $this->buyer = $buyer; } public function getCategory(): ?TaxonInterface { return $this->category; } public function setCategory(TaxonInterface $category): void { $this->category = $category; } public function getCountry(): ?CountryInterface { return $this->country; } public function setCountry(CountryInterface $country): void { $this->country = $country; } public function getApprovalStatus(): ?string { return $this->approvalStatus; } public function setApprovalStatus(?string $approvalStatus): void { $this->approvalStatus = $approvalStatus; } public function getDetails(): ?string { return $this->details; } public function setDetails(?string $details): void { $this->details = $details; } public function getRevisionReason(): ?string { return $this->revisionReason; } public function setRevisionReason(?string $revisionReason): void { $this->revisionReason = $revisionReason; } public function getRejectedReason(): ?string { return $this->rejectedReason; } public function setRejectedReason(?string $rejectedReason): void { $this->rejectedReason = $rejectedReason; } public function getSubject(): ?string { return $this->subject; } public function setSubject(?string $subject): void { $this->subject = $subject; } public function getAttachments(): Collection { return $this->attachments; } public function addAttachment(CRFQAttachmentInterface $attachment): void { if (!$this->hasAttachment($attachment)) { $this->attachments->add($attachment); } } public function removeAttachment(CRFQAttachmentInterface $attachment): void { if ($this->hasAttachment($attachment)) { $this->attachments->removeElement($attachment); } } public function hasAttachment(CRFQAttachmentInterface $attachment): bool { return $this->attachments->contains($attachment); } public function getSelectedCountries(): Collection { return $this->selectedCountries; } public function addSelectedCountry(CountryInterface $country): void { if (!$this->hasSelectedCountry($country)) { $this->selectedCountries->add($country); } } public function removeSelectedCountry(CountryInterface $country): void { if ($this->hasSelectedCountry($country)) { $this->selectedCountries->removeElement($country); } } public function hasSelectedCountry(CountryInterface $country): bool { return $this->selectedCountries->contains($country); } public function getSelectedSellers(): Collection { return $this->selectedSellers; } public function addSelectedSeller(OrganizationInterface $seller): void { if (!$this->hasSelectedSeller($seller)) { $this->selectedSellers->add($seller); } } public function removeSelectedSeller(OrganizationInterface $seller): void { if ($this->hasSelectedSeller($seller)) { $this->selectedSellers->removeElement($seller); } } public function hasSelectedSeller(OrganizationInterface $seller): bool { return $this->selectedSellers->contains($seller); } public function getSellersCRFQ(): Collection { return $this->sellersCRFQ; } public function addSellerCRFQ(SellerCRFQInterface $sellerCRFQ): void { if (!$this->hasSellerCRFQ($sellerCRFQ)) { $this->sellersCRFQ->add($sellerCRFQ); } } public function removeSellerCRFQ(SellerCRFQInterface $sellerCRFQ): void { if ($this->hasSellerCRFQ($sellerCRFQ)) { $this->sellersCRFQ->removeElement($sellerCRFQ); } } public function hasSellerCRFQ(SellerCRFQInterface $sellerCRFQ): bool { return $this->sellersCRFQ->contains($sellerCRFQ); } public function getDeliveryDate(): ?DateTimeInterface { return $this->deliveryDate; } public function setDeliveryDate(?DateTimeInterface $deliveryDate): void { $this->deliveryDate = $deliveryDate; } public function getOfferDeliveryDate(): ?DateTimeInterface { return $this->offerDeliveryDate; } public function setOfferDeliveryDate(?DateTimeInterface $offerDeliveryDate): void { $this->offerDeliveryDate = $offerDeliveryDate; } public function getRevisionDate(): ?DateTimeInterface { return $this->revisionDate; } public function setRevisionDate(?DateTimeInterface $revisionDate): void { $this->revisionDate = $revisionDate; } public function getRejectedDate(): ?DateTimeInterface { return $this->rejectedDate; } public function setRejectedDate(?DateTimeInterface $rejectedDate): void { $this->rejectedDate = $rejectedDate; }}