<?php
namespace App\Entity;
use App\Repository\MailRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=MailRepository::class)
*/
class Mail
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=4083, nullable=true)
*/
private $subject;
/**
* @ORM\Column(type="string", length=1023)
*/
private $sender;
/**
* @ORM\Column(type="string", length=1023)
*/
private $receiver;
/**
* @ORM\Column(type="string", length=255)
*/
private $receiveDate;
/**
* @ORM\Column(type="string", length=2047)
*/
private $message_id;
/**
* @ORM\Column(type="integer")
*/
private $message_uid;
/**
* @ORM\Column(type="text", length=65535)
*/
private $message_text;
/**
* @ORM\ManyToOne(targetEntity=Agent::class,cascade={"persist"})
*/
private $agent;
/**
* @ORM\ManyToOne(targetEntity=Customer::class,cascade={"persist"})
*/
private $customer;
/**
* @ORM\OneToMany(targetEntity=MailAttachment::class, mappedBy="mail", orphanRemoval=true)
*/
private $mailAttachments;
public function __construct()
{
$this->mailAttachments = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return mixed
*/
public function getSubject()
{
return $this->subject;
}
/**
* @param mixed $subject
*/
public function setSubject($subject): void
{
$this->subject = $subject;
}
/**
* @return mixed
*/
public function getSender()
{
return $this->sender;
}
/**
* @param mixed $sender
*/
public function setSender($sender): void
{
$this->sender = $sender;
}
/**
* @return mixed
*/
public function getReceiver()
{
return $this->receiver;
}
/**
* @param mixed $receiver
*/
public function setReceiver($receiver): void
{
$this->receiver = $receiver;
}
/**
* @return mixed
*/
public function getReceiveDate()
{
return $this->receiveDate;
}
/**
* @param mixed $receiveDate
*/
public function setReceiveDate($receiveDate): void
{
$this->receiveDate = $receiveDate;
}
/**
* @return mixed
*/
public function getMessageId()
{
return $this->message_id;
}
/**
* @param mixed $message_id
*/
public function setMessageId($message_id): void
{
$this->message_id = $message_id;
}
/**
* @return mixed
*/
public function getMessageUid()
{
return $this->message_uid;
}
/**
* @param mixed $message_uid
*/
public function setMessageUid($message_uid): void
{
$this->message_uid = $message_uid;
}
/**
* @return ?Agent
*/
public function getAgent()
{
return $this->agent;
}
/**
* @param ?Agent $agent
*/
public function setAgent($agent): void
{
$this->agent = $agent;
}
/**
* @return ?Customer
*/
public function getCustomer()
{
return $this->customer;
}
/**
* @param ?Customer $customer
*/
public function setCustomer($customer): void
{
$this->customer = $customer;
}
/**
* @return mixed
*/
public function getMessageText()
{
return $this->message_text;
}
/**
* @param mixed $message_text
*/
public function setMessageText($message_text): void
{
$this->message_text = $message_text;
}
/**
* @return mixed
*/
public function getMailAttachments()
{
return $this->mailAttachments;
}
/**
* @param mixed $mailAttachments
*/
public function setMailAttachments($mailAttachments): void
{
$this->mailAttachments = $mailAttachments;
}
}