src/Entity/Quote/QuoteRequest.php line 22
<?phpnamespace App\Entity\Quote;use App\Entity\Customer\Customer;use App\Entity\Messaging\Thread;use App\Entity\Product\Product;use App\Entity\Product\ProductMesurementUnit;use App\Entity\Taxonomy\Taxon;use App\Entity\User\ShopUser;use App\Repository\Quote\QuoteRequestRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Sylius\Component\Resource\Model\ResourceInterface;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity]#[ORM\Table(name: 'app_quote_request')]class QuoteRequest implements ResourceInterface{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 50)]private ?string $marking = null;#[ORM\Column]#[Assert\NotBlank]#[Assert\Positive]private ?int $quantity = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $note = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $createdAt = null;#[ORM\ManyToOne]private ?Taxon $taxon = null;#[ORM\ManyToOne]private ?Product $product = null;#[ORM\ManyToOne]private ?Customer $customer = null;#[ORM\ManyToOne]private ?ShopUser $owner = null;#[ORM\OneToOne(cascade: ['persist', 'remove'])]private ?Thread $thread = null;#[ORM\ManyToOne]private ?ProductMesurementUnit $unit = null;#[ORM\OneToMany(mappedBy: 'quote', targetEntity: QuoteRequestAttribute::class,cascade: ['persist', 'remove'], orphanRemoval: true)]private Collection $attributes;#[ORM\OneToMany(mappedBy: 'quote', targetEntity: QuoteRequestOption::class,cascade: ['persist', 'remove'])]private Collection $options;#[ORM\OneToMany(mappedBy: 'quote', targetEntity: QuoteRequestFile::class,cascade: ['persist', 'remove'])]private Collection $files;#[ORM\Column(length: 150, nullable: true)]#[Assert\NotBlank]#[Assert\Length(min: 2,max: 150,minMessage: 'Your first name must be at least {{ limit }} characters long',maxMessage: 'Your first name cannot be longer than {{ limit }} characters',)]private ?string $firstname = null;#[ORM\Column(length: 150, nullable: true)]#[Assert\NotBlank]#[Assert\Length(min: 2,max: 150,minMessage: 'Your last name must be at least {{ limit }} characters long',maxMessage: 'Your last name cannot be longer than {{ limit }} characters',)]private ?string $lastname = null;#[ORM\Column(length: 255, nullable: true)]#[Assert\NotBlank]#[Assert\Email(message: 'The email {{ value }} is not a valid email.',)]private ?string $email = null;#[ORM\Column(length: 50, nullable: true)]#[Assert\NotBlank]private ?string $phoneNumber = null;#[ORM\Column(length: 255)]#[Assert\NotBlank]#[Assert\Length(min: 2,max: 150,minMessage: 'Company name must be at least {{ limit }} characters long',maxMessage: 'Company name cannot be longer than {{ limit }} characters',)]private ?string $company = null;#[ORM\Column(length: 255, nullable: true)]private ?string $companyWebsite = null;#[ORM\Column(length: 3)]private ?string $country = null;#[ORM\Column(length: 255)]#[Assert\NotBlank]#[Assert\Length(min: 2,minMessage: 'Company address must be at least {{ limit }} characters long',)]private ?string $companyAddress = null;#[ORM\Column(length: 255, nullable: true)]private ?string $dimensions = null;#[ORM\Column(nullable: true)]private ?bool $sample = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $updatedAt = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeImmutable $deletedAt = null;#[ORM\Column(length: 30, nullable: true)]private ?string $code = null;#[ORM\Column(length: 30, nullable: true)]private ?string $type = null;#[ORM\OneToMany(mappedBy: 'quote', targetEntity: QuoteRequestWorkflowTransition::class, cascade: ['persist', 'remove'])]private Collection $transitions;public function __construct(){$this->attributes = new ArrayCollection();$this->options = new ArrayCollection();$this->files = new ArrayCollection();$this->marking = 'opened';$this->createdAt = new \Datetime();$this->updatedAt = new \Datetime();$this->transitions = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getMarking(): ?string{return $this->marking;}public function setMarking(string $marking): self{$this->marking = $marking;return $this;}public function getQuantity(): ?int{return $this->quantity;}public function setQuantity(int $quantity): self{$this->quantity = $quantity;return $this;}public function getNote(): ?string{return $this->note;}public function setNote(?string $note): self{$this->note = $note;return $this;}public function getCreatedAt(): ?\DateTimeInterface{return $this->createdAt;}public function setCreatedAt(\DateTimeInterface $createdAt): self{$this->createdAt = $createdAt;return $this;}public function getTaxon(): ?Taxon{return $this->taxon;}public function setTaxon(?Taxon $taxon): self{$this->taxon = $taxon;return $this;}public function getProduct(): ?Product{return $this->product;}public function setProduct(?Product $product): self{$this->product = $product;return $this;}public function getCustomer(): ?Customer{return $this->customer;}public function setCustomer(?Customer $customer): self{$this->customer = $customer;return $this;}public function getOwner(): ?ShopUser{return $this->owner;}public function setOwner(?ShopUser $owner): self{$this->owner = $owner;return $this;}public function getThread(): ?Thread{return $this->thread;}public function setThread(?Thread $thread): self{$this->thread = $thread;return $this;}public function getUnit(): ?ProductMesurementUnit{return $this->unit;}public function setUnit(?ProductMesurementUnit $unit): self{$this->unit = $unit;return $this;}/*** @return Collection<int, QuoteRequestAttribute>*/public function getAttributes(): Collection{return $this->attributes;}public function addAttribute(QuoteRequestAttribute $attribute): self{if (!$this->attributes->contains($attribute)) {$this->attributes->add($attribute);$attribute->setQuote($this);}return $this;}public function removeAttribute(QuoteRequestAttribute $attribute): self{if ($this->attributes->removeElement($attribute)) {// set the owning side to null (unless already changed)if ($attribute->getQuote() === $this) {$attribute->setQuote(null);}}return $this;}/*** @return Collection<int, QuoteRequestOption>*/public function getOptions(): Collection{return $this->options;}public function addOption(QuoteRequestOption $option): self{if (!$this->options->contains($option)) {$this->options->add($option);$option->setQuote($this);}return $this;}public function removeOption(QuoteRequestOption $option): self{if ($this->options->removeElement($option)) {// set the owning side to null (unless already changed)if ($option->getQuote() === $this) {$option->setQuote(null);}}return $this;}/*** @return Collection<int, QuoteRequestFile>*/public function getFiles(): Collection{return $this->files;}public function addFile(QuoteRequestFile $file): self{if (!$this->files->contains($file)) {$this->files->add($file);$file->setQuote($this);}return $this;}public function removeFile(QuoteRequestFile $file): self{if ($this->files->removeElement($file)) {// set the owning side to null (unless already changed)if ($file->getQuote() === $this) {$file->setQuote(null);}}return $this;}public function getFirstname(): ?string{return $this->firstname;}public function setFirstname(?string $firstname): self{$this->firstname = $firstname;return $this;}public function getLastname(): ?string{return $this->lastname;}public function setLastname(?string $lastname): self{$this->lastname = $lastname;return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(?string $email): self{$this->email = $email;return $this;}public function getPhoneNumber(): ?string{return $this->phoneNumber;}public function setPhoneNumber(?string $phoneNumber): self{$this->phoneNumber = $phoneNumber;return $this;}public function getCompany(): ?string{return $this->company;}public function setCompany(string $company): self{$this->company = $company;return $this;}public function getCompanyWebsite(): ?string{return $this->companyWebsite;}public function setCompanyWebsite(?string $companyWebsite): self{$this->companyWebsite = $companyWebsite;return $this;}public function getCountry(): ?string{return $this->country;}public function setCountry(string $country): self{$this->country = $country;return $this;}public function getCompanyAddress(): ?string{return $this->companyAddress;}public function setCompanyAddress(string $companyAddress): self{$this->companyAddress = $companyAddress;return $this;}public function getDimensions(): ?string{return $this->dimensions;}public function setDimensions(?string $dimensions): self{$this->dimensions = $dimensions;return $this;}public function isSample(): ?bool{return $this->sample;}public function setSample(?bool $sample): self{$this->sample = $sample;return $this;}public function getUpdatedAt(): ?\DateTimeInterface{return $this->updatedAt;}public function setUpdatedAt(\DateTimeInterface $updatedAt): self{$this->updatedAt = $updatedAt;return $this;}public function getDeletedAt(): ?\DateTimeImmutable{return $this->deletedAt;}public function setDeletedAt(?\DateTimeImmutable $deletedAt): self{$this->deletedAt = $deletedAt;return $this;}public function getCode(): ?string{return $this->code;}public function setCode(?string $code): self{$this->code = $code;return $this;}public function getType(): ?string{return $this->type;}public function setType(?string $type): self{$this->type = $type;return $this;}/*** @return Collection<int, QuoteRequestWorkflowTransition>*/public function getTransitions(): Collection{return $this->transitions;}public function addTransition(QuoteRequestWorkflowTransition $transition): self{if (!$this->transitions->contains($transition)) {$this->transitions->add($transition);$transition->setQuote($this);}return $this;}public function removeTransition(QuoteRequestWorkflowTransition $transition): self{if ($this->transitions->removeElement($transition)) {// set the owning side to null (unless already changed)if ($transition->getQuote() === $this) {$transition->setQuote(null);}}return $this;}}