src/Entity/Offer.php line 12
<?phpnamespace App\Entity;use App\Repository\OfferRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: OfferRepository::class)]class Offer{#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: "integer")]private $id;#[ORM\Column(type: "string", length: 255)]private $name;#[ORM\Column(type: "string", length: 255)]private $badgeContent;#[ORM\Column(type: "string", length: 255, nullable: true)]private $title;#[ORM\Column(type: "string", length: 255)]private $amount;#[ORM\Column(type: "datetime_immutable")]private $start_at;#[ORM\Column(type: "datetime_immutable")]private $end_at;#[ORM\OneToMany(targetEntity: OfferProduct::class, mappedBy: "offer", orphanRemoval: true)]private $offerProducts;#[ORM\Column(type: "string", length: 255, nullable: true)]private $imageName;#[ORM\Column(type: "string", length: 255, nullable: true)]private $mentions;#[ORM\Column(type: "string", length: 10)]private $amountType;#[ORM\Column(type: "string", length: 20)]private $type;#[ORM\Column(type: "datetime_immutable")]private $addedAt;#[ORM\Column(type: "string", length: 20)]private $color;/*** @ORM\Column(type="string", length=255, nullable=true)*/private $offerUrl;#[ORM\Column(length: 255, nullable: true)]private ?string $amount_rib_payment = null;#[ORM\Column]private ?bool $is_archived = null;#[ORM\Column(type: "datetime_immutable")]private ?\DateTimeImmutable $validityEndDate = null;public function __construct(){$this->offerProducts = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function getBadgeContent(): ?string{return $this->badgeContent;}public function setBadgeContent(string $badgeContent): self{$this->badgeContent = $badgeContent;return $this;}public function getTitle(): ?string{return $this->title;}public function setTitle(?string $title): self{$this->title = $title;return $this;}public function getAmount(): ?string{return $this->amount;}public function setAmount(string $amount): self{$this->amount = $amount;return $this;}public function getStartAt(): ?\DateTimeImmutable{return $this->start_at;}public function setStartAt(\DateTimeImmutable $start_at): self{$this->start_at = $start_at;return $this;}public function getEndAt(): ?\DateTimeImmutable{return $this->end_at;}public function setEndAt(\DateTimeImmutable $end_at): self{$this->end_at = $end_at;return $this;}/*** @return Collection<int, OfferProduct>*/public function getOfferProducts(): Collection{return $this->offerProducts;}public function addOfferProduct(OfferProduct $offerProduct): self{if (!$this->offerProducts->contains($offerProduct)) {$this->offerProducts[] = $offerProduct;$offerProduct->setOffer($this);}return $this;}public function removeOfferProduct(OfferProduct $offerProduct): self{if ($this->offerProducts->removeElement($offerProduct)) {// set the owning side to null (unless already changed)if ($offerProduct->getOffer() === $this) {$offerProduct->setOffer(null);}}return $this;}public function getImageName(): ?string{return $this->imageName;}public function setImageName(?string $imageName): self{$this->imageName = $imageName;return $this;}public function getMentions(): ?string{return $this->mentions;}public function setMentions(?string $mentions): self{$this->mentions = $mentions;return $this;}public function getAmountType(): ?string{return $this->amountType;}public function setAmountType(string $amountType): self{$this->amountType = $amountType;return $this;}public function getType(): ?string{return $this->type;}public function setType(string $type): self{$this->type = $type;return $this;}public function getTypeFormatted(): ?string{if($this->type === "overcost"){return "SurcĂ´te reprise";}else{return "Bonus reprise";}}public function getAddedAt(): ?\DateTimeImmutable{return $this->addedAt;}public function setAddedAt(\DateTimeImmutable $addedAt): self{$this->addedAt = $addedAt;return $this;}public function getColor(): ?string{return $this->color;}public function setColor(string $color): self{$this->color = $color;return $this;}/*** @return mixed*/public function getOfferUrl(){return $this->offerUrl;}/*** @param mixed $offerUrl*/public function setOfferUrl($offerUrl): void{$this->offerUrl = $offerUrl;}public function getAmountRibPayment(): ?string{return $this->amount_rib_payment;}public function setAmountRibPayment(?string $amount_rib_payment): static{$this->amount_rib_payment = $amount_rib_payment;return $this;}public function isIsArchived(): ?bool{return $this->is_archived;}public function setIsArchived(bool $is_archived): static{$this->is_archived = $is_archived;return $this;}public function getValidityEndDate(): ?\DateTimeImmutable{return $this->validityEndDate;}public function setValidityEndDate(?\DateTimeImmutable $validityEndDate): static{$this->validityEndDate = $validityEndDate;return $this;}}