src/Entity/UserAlertStock/AvailabilityNotifier.php line 18

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