<?php
namespace App\Entity;
use App\Repository\LogEmailRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=LogEmailRepository::class)
*/
class LogEmail
{
const CATEGORY_EMAIL_INACTIVITY = "email_inactivity";
const SUB_EMAIL_INACTIVITY_NEW_FIRST = "new_first_inactivity";
const SUB_EMAIL_INACTIVITY_FIRST = "first_inactivity";
const SUB_EMAIL_INACTIVITY_SECOND = "second_inactivity";
const SUB_EMAIL_INACTIVITY_THIRD = "third_inactivity";
const CATEGORIES = [
self::CATEGORY_EMAIL_INACTIVITY
];
const SUB_CATEGORIES = [
self::CATEGORY_EMAIL_INACTIVITY => [
self::SUB_EMAIL_INACTIVITY_NEW_FIRST,
self::SUB_EMAIL_INACTIVITY_FIRST,
self::SUB_EMAIL_INACTIVITY_SECOND,
self::SUB_EMAIL_INACTIVITY_THIRD
]
];
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=TvUser::class, inversedBy="logEmails")
*/
private $tvUser;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="logEmails")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity=TvCompany::class, inversedBy="logEmails")
*/
private $tvCompany;
/**
* @ORM\ManyToOne(targetEntity=Company::class, inversedBy="logEmails")
*/
private $company;
/**
* @ORM\Column(type="datetime")
* @Gedmo\Timestampable(on="create")
*/
private $createdAt;
/**
* @ORM\Column(type="text")
*/
private $message;
/**
* @ORM\Column(type="string", length=255)
*/
private $category;
/**
* @ORM\Column(type="string", length=255)
*/
private $subCategory;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $emails;
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(string $message): self
{
$this->message = $message;
return $this;
}
public function getCategory(): ?string
{
return $this->category;
}
public function setCategory(string $category): self
{
$this->category = $category;
return $this;
}
public function getSubCategory(): ?string
{
return $this->subCategory;
}
public function setSubCategory(string $subCategory): self
{
$this->subCategory = $subCategory;
return $this;
}
public function getTvUser(): ?TvUser
{
return $this->tvUser;
}
public function setTvUser(?TvUser $tvUser): self
{
$this->tvUser = $tvUser;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getTvCompany(): ?TvCompany
{
return $this->tvCompany;
}
public function setTvCompany(?TvCompany $tvCompany): self
{
$this->tvCompany = $tvCompany;
return $this;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
public function getEmails(): ?string
{
return $this->emails;
}
public function setEmails(?string $emails): self
{
$this->emails = $emails;
return $this;
}
}