src/Entity/GeoEdge/AdDomain.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\GeoEdge;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\GeoEdge\AdDomainRepository;
  6. /**
  7.  * AggregateDomain entity
  8.  *
  9.  * @ORM\Entity(repositoryClass=AdDomainRepository::class, readOnly=true)
  10.  * @ORM\Table(name="openx.ox_ad_domains")
  11.  *
  12.  */
  13. class AdDomain
  14. {
  15.     const STATUS_ACTIVE 0;
  16.     const STATUS_PAUSED 1;
  17.     /**
  18.      *
  19.      * The Id
  20.      *
  21.      * @var int
  22.      *
  23.      * @ORM\Column(name="domain_id", type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     public $id;
  28.     /**
  29.      *
  30.      * The Domain Name
  31.      *
  32.      * @var string
  33.      *
  34.      * @ORM\Column(name="domain", type="string", length=64, nullable=false)
  35.      */
  36.     public $domain;
  37.     /**
  38.      *
  39.      * The Domain Scope
  40.      *
  41.      * @var int
  42.      *
  43.      * @ORM\Column(name="domain_scope", type="smallint", nullable=true)
  44.      */
  45.     public $scope;
  46.     /**
  47.      *
  48.      * The status
  49.      *
  50.      * @var bool
  51.      *
  52.      * @ORM\Column(name="status", type="integer", nullable=false, options={"default" : 0})
  53.      */
  54.     public $status self::STATUS_ACTIVE;
  55.     /**
  56.      * End timestamp
  57.      *
  58.      * @var DateTime
  59.      *
  60.      * @ORM\Column(name="end_date", type="date", nullable=false)
  61.      */
  62.     public $endDate;
  63.     /**
  64.      *
  65.      * Is domain default
  66.      *
  67.      * @var bool
  68.      *
  69.      * @ORM\Column(name="is_default", type="integer", nullable=false, options={"default" : 0})
  70.      */
  71.     public $isDefault;
  72.     /**
  73.      * @return int
  74.      */
  75.     public function getId(): int
  76.     {
  77.         return $this->id;
  78.     }
  79.     /**
  80.      * @return string
  81.      */
  82.     public function getDomain(): string
  83.     {
  84.         return $this->domain ?? '';
  85.     }
  86.     /**
  87.      * @return int|null
  88.      */
  89.     public function getScope(): ?int
  90.     {
  91.         return $this->scope;
  92.     }
  93.     /**
  94.      * @return DateTime|null
  95.      */
  96.     public function getEndDate(): ?DateTime
  97.     {
  98.         return $this->endDate;
  99.     }
  100.     /**
  101.      * @return bool
  102.      */
  103.     public function isIsDefault(): bool
  104.     {
  105.         return $this->isDefault ?? false;
  106.     }
  107.     /**
  108.      * @return bool
  109.      */
  110.     public function isStatus(): bool
  111.     {
  112.         return $this->status ?? false;
  113.     }
  114. }