src/AtechNet/CoreBundle/Entity/MarketplaceListingStatistics.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping\Column;
  4. use Doctrine\ORM\Mapping\Entity;
  5. use Doctrine\ORM\Mapping\JoinColumn;
  6. use Doctrine\ORM\Mapping\ManyToOne;
  7. use Doctrine\ORM\Mapping\OneToOne;
  8. use Doctrine\ORM\Mapping\Table as Table;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. /**
  11.  * MarketplaceListingStatistics
  12.  *
  13.  * @Table(name="marketplace_listings_statistics")
  14.  * @Entity()
  15.  */
  16. class MarketplaceListingStatistics extends AbstractEntity
  17. {
  18.     public const TYPE_ID_NEW_LISTING = 1;
  19.     public const TYPE_ID_AVAILABILITY_CHANGE = 2;
  20.     public const TYPE_ID_PRICE_CHANGE = 3;
  21.     public const TYPE_ID_PRICE_CHANGE_FOR_BUYBOX = 4;
  22.     public const TYPE_ID_APPROVED_LISTING_COUNT = 5;
  23.     public const TYPE_ID_ACTIVATED_LISTING_COUNT = 6;
  24.     public const TYPE_ID_DEACTIVATED_LISTING_COUNT = 7;
  25.     /**
  26.      * @var Customer|null
  27.      *
  28.      * @ManyToOne(targetEntity="Customer")
  29.      * @JoinColumn(name="marketplace_id", referencedColumnName="id")
  30.      */
  31.     private ?Customer $marketplace = null;
  32.     /**
  33.      * @var int
  34.      *
  35.      * @Column(name="type", type="integer")
  36.      */
  37.     private $type;
  38.     /**
  39.      * @var int
  40.      *
  41.      * @Column(name="quantity", type="integer")
  42.      */
  43.     private $quantity;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @Column(name="task_id", type="string", length=64, nullable=true)
  48.      */
  49.     private $taskId;
  50.     /**
  51.      * @var bool
  52.      * 
  53.      * @Column(name="is_update_completed", type="boolean")
  54.      */
  55.     private $isUpdateCompleted = true;
  56.     /**
  57.      * @var MarketplaceJobProductModel|null
  58.      *
  59.      * @OneToOne(targetEntity="MarketplaceJobProductModel", mappedBy="marketplaceListingStatisticsItem")
  60.      * @JoinColumn(name="marketplace_job_product_model_id", referencedColumnName="id", nullable=true)
  61.      */
  62.     private ?MarketplaceJobProductModel $marketplaceJobProductModel;
  63.     /**
  64.      * @return Customer|null
  65.      */
  66.     public function getMarketplace(): ?Customer
  67.     {
  68.         return $this->marketplace;
  69.     }
  70.     /**
  71.      * @param Customer|null $marketplace
  72.      */
  73.     public function setMarketplace(?Customer $marketplace)
  74.     {
  75.         $this->marketplace = $marketplace;
  76.     }
  77.     /**
  78.      * @return int
  79.      */
  80.     public function getQuantity(): int
  81.     {
  82.         return $this->quantity;
  83.     }
  84.     /**
  85.      * @param int $quantity
  86.      */
  87.     public function setQuantity(int $quantity)
  88.     {
  89.         $this->quantity = $quantity;
  90.     }
  91.     /**
  92.      * @return int
  93.      */
  94.     public function getType(): int
  95.     {
  96.         return $this->type;
  97.     }
  98.     /**
  99.      * @param int $type
  100.      */
  101.     public function setType(int $type)
  102.     {
  103.         $this->type = $type;
  104.     }
  105.     /**
  106.      * @return null|string
  107.      */
  108.     public function getTaskId(): ?string
  109.     {
  110.         return $this->taskId;
  111.     }
  112.     /**
  113.      * @param mixed $taskId
  114.      * @return void
  115.      */
  116.     public function setTaskId(?string $taskId)
  117.     {
  118.         $this->taskId = $taskId;
  119.     }
  120.     /**
  121.      * @return bool
  122.      */
  123.     public function getIsUpdateCompleted(): bool
  124.     {
  125.         return $this->isUpdateCompleted;
  126.     }
  127.     /**
  128.      * @param bool $isUpdateCompleted
  129.      */
  130.     public function setIsUpdateCompleted(bool $isUpdateCompleted)
  131.     {
  132.         $this->isUpdateCompleted = $isUpdateCompleted;
  133.     }
  134.     /**
  135.      * @return MarketplaceJobProductModel|null
  136.      */
  137.     public function getMarketplaceJobProductModel(): ?MarketplaceJobProductModel
  138.     {
  139.         return $this->marketplaceJobProductModel;
  140.     }
  141.     /**
  142.      * @param MarketplaceJobProductModel|null $marketplaceJobProductModel
  143.      * @return void
  144.      */
  145.     public function setMarketplaceJobProductModel(?MarketplaceJobProductModel $marketplaceJobProductModel): void
  146.     {
  147.         $this->marketplaceJobProductModel = $marketplaceJobProductModel;
  148.     }
  149. }