src/Products/NotificationsBundle/Entity/AutomationRecord.php line 31

Open in your IDE?
  1. <?php
  2. namespace Products\NotificationsBundle\Entity;
  3. use App\Entity\System\School;
  4. use App\Model\Query\ConditionQuery\ConditionQuery;
  5. use Cms\TenantBundle\Entity\TenantedEntity;
  6. use DateTime;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Products\NotificationsBundle\Entity\Lists\ConditionList;
  9. use Products\NotificationsBundle\Entity\Notifications\Template;
  10. /**
  11.  *
  12.  * @ORM\Entity(
  13.  *     repositoryClass = "Products\NotificationsBundle\Doctrine\Repository\AutomationRecordRepository",
  14.  * )
  15.  * @ORM\Table(
  16.  *     name = "notis__automation_record",
  17.  *     uniqueConstraints = {
  18.  *         @ORM\UniqueConstraint(
  19.  *             name = "uidx__profile__automation",
  20.  *             columns = {
  21.  *                 "profile",
  22.  *                 "automation",
  23.  *             },
  24.  *         ),
  25.  *     },
  26.  * )
  27.  */
  28. class AutomationRecord extends TenantedEntity
  29. {
  30.     /**
  31.      * @var Profile
  32.      *
  33.      * @ORM\ManyToOne(
  34.      *     targetEntity = Profile::class,
  35.      *     inversedBy = "automationRecords",
  36.      * )
  37.      * @ORM\JoinColumn(
  38.      *     name = "profile",
  39.      *     referencedColumnName = "id",
  40.      *     nullable = false,
  41.      * )
  42.      */
  43.     private Profile $profile;
  44.     /**
  45.      * @var Automation
  46.      *
  47.      * @ORM\ManyToOne(
  48.      *     targetEntity = Automation::class,
  49.      * )
  50.      * @ORM\JoinColumn(
  51.      *     name = "automation",
  52.      *     referencedColumnName = "id",
  53.      *     nullable = false,
  54.      *     onDelete = "CASCADE",
  55.      * )
  56.      */
  57.     private Automation $automation;
  58.     /**
  59.      * @var DateTime|null
  60.      *
  61.      * @ORM\Column(
  62.      *     type = "datetime",
  63.      *     nullable = true,
  64.      * )
  65.      */
  66.     private ?DateTime $timestamp null;
  67.     /**
  68.      * @return Profile
  69.      */
  70.     public function getProfile(): Profile
  71.     {
  72.         return $this->profile;
  73.     }
  74.     /**
  75.      * @param Profile $profile
  76.      * @return self
  77.      */
  78.     public function setProfile(Profile $profile): self
  79.     {
  80.         $this->profile $profile;
  81.         return $this;
  82.     }
  83.     /**
  84.      * @return Automation
  85.      */
  86.     public function getAutomation(): Automation
  87.     {
  88.         return $this->automation;
  89.     }
  90.     /**
  91.      * @param Automation $automation
  92.      * @return self
  93.      */
  94.     public function setAutomation(Automation $automation): self
  95.     {
  96.         $this->automation $automation;
  97.         return $this;
  98.     }
  99.     /**
  100.      * @return DateTime|null
  101.      */
  102.     public function getTimestamp(): ?DateTime
  103.     {
  104.         return $this->timestamp;
  105.     }
  106.     /**
  107.      * @param DateTime|null $timestamp
  108.      * @return self
  109.      */
  110.     public function setTimestamp(?DateTime $timestamp): self
  111.     {
  112.         $this->timestamp $timestamp;
  113.         return $this;
  114.     }
  115. }