src/Entity/CustomerPackage.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CustomerPackageRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCustomerPackageRepository::class)]
  8. class CustomerPackage
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column]
  15.     private ?int $fieldLength null;
  16.     #[ORM\Column]
  17.     private ?int $fieldWidth null;
  18.     #[ORM\ManyToOne]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     private ?PackageImage $packageImage null;
  21.     #[ORM\OneToMany(
  22.         mappedBy'customerPackage',
  23.         targetEntity'App\Entity\CustomerAdvertisingAreaTierSettings',
  24.         cascade: ['persist''remove']
  25.     )]
  26.     private Collection $customerAdvertisingAreaTierSettings;
  27.     #[ORM\ManyToOne(targetEntityCustomer::class, cascade: ['persist'], inversedBy'packages')]
  28.     #[ORM\JoinColumn(nullabletrue)]
  29.     private Customer $customer;
  30.     #[ORM\OneToMany(
  31.         mappedBy'customerPackage',
  32.         targetEntity'App\Entity\CustomerAdvertisingAreaTierPosition',
  33.         cascade: ['persist''remove']
  34.     )]
  35.     private Collection $customerAdvertisingAreaTierPosition;
  36.     #[ORM\Column(nullabletrue)]
  37.     private ?string $colorFree '#869859';
  38.     #[ORM\Column(nullabletrue)]
  39.     private ?string $colorSold '#9a3838';
  40.     #[ORM\Column(nullabletrue)]
  41.     private ?string $colorReserved '#686868';
  42.     #[ORM\Column(nullabletrue)]
  43.     private ?string $colorBlocked '#fdfdfd';
  44.     #[ORM\Column(nullabletrue)]
  45.     private ?bool $draft null;
  46.     public function __construct()
  47.     {
  48.         $this->customerAdvertisingAreaTierSettings = new ArrayCollection();
  49.         $this->customerAdvertisingAreaTierPosition = new ArrayCollection();
  50.     }
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getPackageImage(): ?PackageImage
  56.     {
  57.         return $this->packageImage;
  58.     }
  59.     public function setPackageImage(?PackageImage $packageImage): self
  60.     {
  61.         $this->packageImage $packageImage;
  62.         return $this;
  63.     }
  64.     /**
  65.      * @return Collection<int, CustomerAdvertisingAreaTierSettings>
  66.      */
  67.     public function getCustomerAdvertisingAreaTierSettings(): Collection
  68.     {
  69.         return $this->customerAdvertisingAreaTierSettings;
  70.     }
  71.     public function addCustomerAdvertisingAreaTierSetting(
  72.         CustomerAdvertisingAreaTierSettings $customerAdvertisingAreaTierSetting
  73.     ): self {
  74.         if (!$this->customerAdvertisingAreaTierSettings->contains($customerAdvertisingAreaTierSetting)) {
  75.             $this->customerAdvertisingAreaTierSettings->add($customerAdvertisingAreaTierSetting);
  76.             $customerAdvertisingAreaTierSetting->setCustomerPackage($this);
  77.         }
  78.         return $this;
  79.     }
  80.     public function removeCustomerAdvertisingAreaTierSetting(
  81.         CustomerAdvertisingAreaTierSettings $customerAdvertisingAreaTierSetting
  82.     ): self {
  83.         if ($this->customerAdvertisingAreaTierSettings->removeElement($customerAdvertisingAreaTierSetting)) {
  84.             // set the owning side to null (unless already changed)
  85.             if ($customerAdvertisingAreaTierSetting->getCustomerPackage() === $this) {
  86.                 $customerAdvertisingAreaTierSetting->setCustomerPackage(null);
  87.             }
  88.         }
  89.         return $this;
  90.     }
  91.     public function getCustomer(): ?Customer
  92.     {
  93.         return $this->customer;
  94.     }
  95.     public function setCustomer(?Customer $customer): self
  96.     {
  97.         $this->customer $customer;
  98.         return $this;
  99.     }
  100.     /**
  101.      * @return Collection<int, CustomerAdvertisingAreaTierPosition>
  102.      */
  103.     public function getCustomerAdvertisingAreaTierPosition(): Collection
  104.     {
  105.         return $this->customerAdvertisingAreaTierPosition;
  106.     }
  107.     public function addCustomerAdvertisingAreaTierPosition(
  108.         CustomerAdvertisingAreaTierPosition $customerAdvertisingAreaTierPosition
  109.     ): self {
  110.         if (!$this->customerAdvertisingAreaTierPosition->contains($customerAdvertisingAreaTierPosition)) {
  111.             $this->customerAdvertisingAreaTierPosition->add($customerAdvertisingAreaTierPosition);
  112.             $customerAdvertisingAreaTierPosition->setCustomerPackage($this);
  113.         }
  114.         return $this;
  115.     }
  116.     public function removeCustomerAdvertisingAreaTierPosition(
  117.         CustomerAdvertisingAreaTierPosition $customerAdvertisingAreaTierPosition
  118.     ): self {
  119.         if ($this->customerAdvertisingAreaTierPosition->removeElement($customerAdvertisingAreaTierPosition)) {
  120.             // set the owning side to null (unless already changed)
  121.             if ($customerAdvertisingAreaTierPosition->getCustomerPackage() === $this) {
  122.                 $customerAdvertisingAreaTierPosition->setCustomerPackage(null);
  123.             }
  124.         }
  125.         return $this;
  126.     }
  127.     public function getColorFree(): ?string
  128.     {
  129.         return $this->colorFree;
  130.     }
  131.     public function setColorFree(string $colorFree): self
  132.     {
  133.         $this->colorFree $colorFree;
  134.         return $this;
  135.     }
  136.     public function getColorSold(): ?string
  137.     {
  138.         return $this->colorSold;
  139.     }
  140.     public function setColorSold(string $colorSold): self
  141.     {
  142.         $this->colorSold $colorSold;
  143.         return $this;
  144.     }
  145.     public function getColorReserved(): ?string
  146.     {
  147.         return $this->colorReserved;
  148.     }
  149.     public function setColorReserved(string $colorReserved): self
  150.     {
  151.         $this->colorReserved $colorReserved;
  152.         return $this;
  153.     }
  154.     public function getColorBlocked(): ?string
  155.     {
  156.         return $this->colorBlocked;
  157.     }
  158.     public function setColorBlocked(string $colorBlocked): self
  159.     {
  160.         $this->colorBlocked $colorBlocked;
  161.         return $this;
  162.     }
  163.     public function isDraft(): ?bool
  164.     {
  165.         return $this->draft;
  166.     }
  167.     public function setDraft(?bool $draft): self
  168.     {
  169.         $this->draft $draft;
  170.         return $this;
  171.     }
  172.     public function getFieldLength(): ?int
  173.     {
  174.         return $this->fieldLength;
  175.     }
  176.     public function setFieldLength(int $fieldLength): self
  177.     {
  178.         $this->fieldLength $fieldLength;
  179.         return $this;
  180.     }
  181.     public function getFieldWidth(): ?int
  182.     {
  183.         return $this->fieldWidth;
  184.     }
  185.     public function setFieldWidth(int $fieldWidth): self
  186.     {
  187.         $this->fieldWidth $fieldWidth;
  188.         return $this;
  189.     }
  190. }