<?php
namespace Products\NotificationsBundle\Entity;
use App\Entity\System\School;
use App\Model\Query\ConditionQuery\ConditionQuery;
use Cms\TenantBundle\Entity\TenantedEntity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Products\NotificationsBundle\Entity\Lists\ConditionList;
use Products\NotificationsBundle\Entity\Notifications\Template;
/**
*
* @ORM\Entity(
* repositoryClass = "Products\NotificationsBundle\Doctrine\Repository\AutomationRecordRepository",
* )
* @ORM\Table(
* name = "notis__automation_record",
* uniqueConstraints = {
* @ORM\UniqueConstraint(
* name = "uidx__profile__automation",
* columns = {
* "profile",
* "automation",
* },
* ),
* },
* )
*/
class AutomationRecord extends TenantedEntity
{
/**
* @var Profile
*
* @ORM\ManyToOne(
* targetEntity = Profile::class,
* inversedBy = "automationRecords",
* )
* @ORM\JoinColumn(
* name = "profile",
* referencedColumnName = "id",
* nullable = false,
* )
*/
private Profile $profile;
/**
* @var Automation
*
* @ORM\ManyToOne(
* targetEntity = Automation::class,
* )
* @ORM\JoinColumn(
* name = "automation",
* referencedColumnName = "id",
* nullable = false,
* onDelete = "CASCADE",
* )
*/
private Automation $automation;
/**
* @var DateTime|null
*
* @ORM\Column(
* type = "datetime",
* nullable = true,
* )
*/
private ?DateTime $timestamp = null;
/**
* @return Profile
*/
public function getProfile(): Profile
{
return $this->profile;
}
/**
* @param Profile $profile
* @return self
*/
public function setProfile(Profile $profile): self
{
$this->profile = $profile;
return $this;
}
/**
* @return Automation
*/
public function getAutomation(): Automation
{
return $this->automation;
}
/**
* @param Automation $automation
* @return self
*/
public function setAutomation(Automation $automation): self
{
$this->automation = $automation;
return $this;
}
/**
* @return DateTime|null
*/
public function getTimestamp(): ?DateTime
{
return $this->timestamp;
}
/**
* @param DateTime|null $timestamp
* @return self
*/
public function setTimestamp(?DateTime $timestamp): self
{
$this->timestamp = $timestamp;
return $this;
}
}