src/Entity/UserAlertStock/AvailabilityNotifier.php line 19

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\UserAlertStock;
  4. use App\Entity\Channel\Channel;
  5. use App\Entity\Locale\Locale;
  6. use App\Entity\Product\ProductVariant;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Timestampable\Traits\TimestampableEntity;
  9. use Sylius\Component\Resource\Model\ResourceInterface;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. /**
  12.  * @ORM\Entity()
  13.  * @ORM\Table(name="app_availability_notifier")
  14.  */
  15. class AvailabilityNotifier implements ResourceInterface
  16. {
  17.     use TimestampableEntity;
  18.     /**
  19.      * @ORM\Id()
  20.      * @ORM\GeneratedValue()
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\Column(name="email_customer", type="string", length=100)
  26.      */
  27.     protected string $emailCustomer ;
  28.     /**
  29.      * @ORM\ManyToOne("App\Entity\Product\ProductVariant")
  30.      * @ORM\JoinColumn(name="product_variant_id", referencedColumnName="id")
  31.      * @Assert\NotBlank()
  32.      */
  33.     private ProductVariant $productVariant;
  34.     /**
  35.      * @ORM\Column(type="boolean")
  36.      */
  37.     private bool $status false;
  38.     /**
  39.      * @ORM\ManyToOne("App\Entity\Channel\Channel")
  40.      * @ORM\JoinColumn(name="channel_id", referencedColumnName="id")
  41.      * @Assert\NotBlank()
  42.      */
  43.     private Channel $channel;
  44.     /**
  45.      * @ORM\Column(name="locale_code", type="string", length=50)
  46.      */
  47.     private string $localeCode;
  48.     /**
  49.      * @return mixed
  50.      */
  51.     public function getId()
  52.     {
  53.         return $this->id;
  54.     }
  55.     /**
  56.      * @param mixed $id
  57.      */
  58.     public function setId($id): void
  59.     {
  60.         $this->id $id;
  61.     }
  62.     /**
  63.      * @return string
  64.      */
  65.     public function getEmailCustomer(): string
  66.     {
  67.         return $this->emailCustomer;
  68.     }
  69.     /**
  70.      * @param string $emailCustomer
  71.      */
  72.     public function setEmailCustomer(string $emailCustomer): void
  73.     {
  74.         $this->emailCustomer $emailCustomer;
  75.     }
  76.     /**
  77.      * @return ProductVariant
  78.      */
  79.     public function getProductVariant(): ProductVariant
  80.     {
  81.         return $this->productVariant;
  82.     }
  83.     /**
  84.      * @param ProductVariant $productVariant
  85.      */
  86.     public function setProductVariant(ProductVariant $productVariant): void
  87.     {
  88.         $this->productVariant $productVariant;
  89.     }
  90.     /**
  91.      * @return bool
  92.      */
  93.     public function isStatus(): bool
  94.     {
  95.         return $this->status;
  96.     }
  97.     /**
  98.      * @param bool $status
  99.      */
  100.     public function setStatus(bool $status): void
  101.     {
  102.         $this->status $status;
  103.     }
  104.     /**
  105.      * @return Channel
  106.      */
  107.     public function getChannel(): Channel
  108.     {
  109.         return $this->channel;
  110.     }
  111.     /**
  112.      * @param Channel $channel
  113.      */
  114.     public function setChannel(Channel $channel): void
  115.     {
  116.         $this->channel $channel;
  117.     }
  118.     /**
  119.      * @return string
  120.      */
  121.     public function getLocaleCode(): string
  122.     {
  123.         return $this->localeCode;
  124.     }
  125.     /**
  126.      * @param string $localeCode
  127.      */
  128.     public function setLocaleCode(string $localeCode): void
  129.     {
  130.         $this->localeCode $localeCode;
  131.     }
  132. }