<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use DateTime;
/**
* @ORM\Entity
* @ORM\Entity(repositoryClass="App\Repository\RequestForProposalRepository")
* @ORM\Table(name="request_for_proposal")
*/
class RequestForProposal
{
use TimestampableEntity;
use BlameableEntity;
/**
/**
* @var int|null
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue
*/
private $id;
/**
* @var string
* @ORM\Column(name="title", type="string")
*/
private $title;
/**
* @var string
* @ORM\Column(type="text", nullable=true)
*/
private $content;
/**
* @ORM\Column(name="deadline", type="date")
*/
private $deadline;
/**
* @ORM\Column(name="deadline_state_interest", type="date", nullable=true)
*/
private $deadlineStateInterest;
/**
* @ORM\Column(name="response_documents_allowed", type="boolean", nullable=true)
*/
private $responseDocumentsAllowed;
/**
* @var ArrayCollection
* @ORM\ManyToMany(targetEntity="App\Entity\RequestForProposalResponseDocument", cascade={"persist"})
* @ORM\JoinTable(name="request_for_proposal_response_documents_collection",
* joinColumns={@ORM\JoinColumn(name="rfp_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="response_document_id", referencedColumnName="id")}
* )
*/
private $responseDocuments;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Document", mappedBy="rfp")
*/
private $documents;
/**
* @var Collection
* @ORM\OneToMany(targetEntity="App\Entity\RequestForProposalCompanyRights", mappedBy="rfp", cascade={"all"}, orphanRemoval=true)
*/
private $companyRights;
/**
* @var Collection
* @ORM\OneToMany(targetEntity="App\Entity\RequestForProposalGroupRights", mappedBy="rfp", cascade={"all"}, orphanRemoval=true)
*/
private $groupRights;
/**
* @var Collection
* @ORM\OneToMany(targetEntity="App\Entity\RequestForProposalInterest", mappedBy="rfp", cascade={"all"}, orphanRemoval=true)
*/
private $interests;
/**
* @var Collection
* @ORM\OneToMany(targetEntity="App\Entity\RequestForProposalResponseDocumentAnswer", mappedBy="rfp", cascade={"all"}, orphanRemoval=true)
*/
private $responseDocumentAnswers;
/**
* @var Provider
* @ORM\ManyToOne(targetEntity="App\Entity\Provider", inversedBy="rfps")
* @ORM\JoinColumn(name="provider_id", referencedColumnName="id")
*/
private $provider;
public function __construct()
{
$this->companyRights = new ArrayCollection();
$this->groupRights = new ArrayCollection();
$this->interests = new ArrayCollection();
$this->documents = new ArrayCollection();
$this->responseDocuments = new ArrayCollection();
$this->responseDocumentAnswers = new ArrayCollection();
}
/**
* @return string
*/
public function __toString(): string
{
return (string)$this->title;
}
public function toString(): string
{
return "{id=" . $this->id . ",title=" . $this->title . "}";
}
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return string
*/
public function getTitle(): ?string
{
return $this->title;
}
/**
* @param string|null $title
*
* @return self
*/
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
/**
* @return string
*/
public function getContent(): ?string
{
return $this->content;
}
/**
* @param string|null $content
*
* @return self
*/
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
/**
* @return DateTime|null
*/
public function getDeadline(): ?DateTime
{
return $this->deadline;
}
/**
* @param DateTime|null $deadline
*/
public function setDeadline(?DateTime $deadline)
{
$this->deadline = $deadline;
}
/**
* @return DateTime|null
*/
public function getDeadlineStateInterest(): ?DateTime
{
return $this->deadlineStateInterest;
}
/**
* @param DateTime|null $deadlineStateInterest
*/
public function setDeadlineStateInterest(?DateTime $deadlineStateInterest)
{
$this->deadlineStateInterest = $deadlineStateInterest;
}
/**
* Get provider
*
* @return Provider
*/
public function getProvider()
{
return $this->provider;
}
/**
* Set provider
*
* @param Provider $provider
*
* @return Provider
*/
public function setProvider(Provider $provider = null)
{
$this->provider = $provider;
return $this;
}
/**
* Add document
* @param Document $document
* @return RequestForProposal
*/
public function addDocument(Document $document)
{
$document->setRfp($this);
$this->documents[] = $document;
return $this;
}
/**
* Remove document
* @param Document $document
*/
public function removeDocument(Document $document)
{
$this->documents->removeElement($document);
}
/**
* Get documents
* @return Collection
*/
public function getDocuments()
{
return $this->documents;
}
/**
* Add groupRight
*
* @param RequestForProposalCompanyRights $companyRights
* @return RequestForProposal
*/
public function addCompanyRight(RequestForProposalCompanyRights $companyRights)
{
$companyRights->setRfp($this);
$this->companyRights[] = $companyRights;
return $this;
}
/**
* Remove groupRight
*
* @param RequestForProposalCompanyRights $companyRights
*/
public function removeCompanyRight(RequestForProposalCompanyRights $companyRights)
{
$this->companyRights->removeElement($companyRights);
}
/**
* Get groupRights
*
* @return Collection
*/
public function getCompanyRights()
{
return $this->companyRights;
}
/**
* Add groupRight
*
* @param RequestForProposalGroupRights $groupRights
* @return RequestForProposal
*/
public function addGroupRight(RequestForProposalGroupRights $groupRights)
{
$groupRights->setRfp($this);
$this->groupRights[] = $groupRights;
return $this;
}
/**
* Remove groupRight
*
* @param RequestForProposalGroupRights $groupRights
*/
public function removeGroupRight(RequestForProposalGroupRights $groupRights)
{
$this->groupRights->removeElement($groupRights);
}
/**
* Get groupRights
*
* @return Collection
*/
public function getGroupRights()
{
return $this->groupRights;
}
/**
* Add interest
*
* @param RequestForProposalInterest $interest
* @return RequestForProposal
*/
public function addInterest(RequestForProposalInterest $interest)
{
$interest->setRfp($this);
$this->interests[] = $interest;
return $this;
}
/**
* Remove interest
*
* @param RequestForProposalInterest $interest
*/
public function removeInterest(RequestForProposalInterest $interest)
{
$this->interests->removeElement($interest);
}
/**
* Get interest
*
* @return Collection
*/
public function getInterests()
{
return $this->interests;
}
/**
* @return boolean
*/
public function getResponseDocumentsAllowed()
{
return $this->responseDocumentsAllowed;
}
/**
* @param boolean $responseDocumentsAllowed
* @return RequestForProposal
*/
public function setResponseDocumentsAllowed($responseDocumentsAllowed)
{
$this->responseDocumentsAllowed = $responseDocumentsAllowed;
return $this;
}
/**
* Add response document
*
* @param RequestForProposalResponseDocument $responseDocument
*
* @return RequestForProposal
*/
public function addResponseDocument(RequestForProposalResponseDocument $responseDocument)
{
$this->responseDocuments[] = $responseDocument;
return $this;
}
/**
* Remove response document
*
* @param RequestForProposalResponseDocument $responseDocument
*/
public function removeResponseDocument(RequestForProposalResponseDocument $responseDocument)
{
$this->responseDocuments->removeElement($responseDocument);
}
/**
* Get response documents
*
* @return Collection
*/
public function getResponseDocuments()
{
return $this->responseDocuments;
}
/**
* Add response document answer
*
* @param RequestForProposalResponseDocumentAnswer $responseDocumentAnswer
* @return RequestForProposal
*/
public function addResponseDocumentAnswer(RequestForProposalResponseDocumentAnswer $responseDocumentAnswer)
{
$responseDocumentAnswer->setRfp($this);
$this->responseDocumentAnswers[] = $responseDocumentAnswer;
return $this;
}
/**
* Remove responseDocumentAnswer
*
* @param RequestForProposalResponseDocumentAnswer $responseDocumentAnswer
*/
public function removeResponseDocumentAnswer(RequestForProposalResponseDocumentAnswer $responseDocumentAnswer)
{
$this->responseDocumentAnswers->removeElement($responseDocumentAnswer);
}
/**
* Get responseDocumentAnswer
*
* @return Collection
*/
public function getResponseDocumentAnswers()
{
return $this->responseDocumentAnswers;
}
}