<?php

namespace AppBundle\Entity\Message;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Dunglas\ApiBundle\Annotation\Iri;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;


/**
 * Email
 *
 * @Iri("http://schema.org/Email")
 */
#[ORM\Entity]
#[ORM\Table(name: 'Booking')]

class Email extends Message implements EmailInterface
{
    /**
     * @var array
     */
    #[ORM\Column(type: 'text', nullable: true)]
    #[Groups(['email', 'reportmessage', 'email_detail'])]
    private $recipientCcRule;
    /**
     * @var array
     */
    #[ORM\Column(type: 'text', nullable: true)]
    #[Groups(['email', 'reportmessage', 'email_detail'])]
    private $recipientCciRule;
    /**
     * @var array
     */
    #[ORM\Column(type: 'json_array')]
    #[Assert\Type(type: 'array')]
    #[Groups(['email', 'reportmessage', 'email_detail'])]
    private $recipientMulti;
    /**
     * @var Mail
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Message\Mail', cascade: ['persist'])]
    #[ORM\JoinColumn(nullable: true)]
    #[Groups(['email', 'email_detail', 'email_detail'])]
    private $mailAttached;
    /**
     * The constructor
     */
    public function __construct()
    {
      parent::__construct();
    }
    /**
     * Set recipientCcRule
     *
     * @param String $recipientCcRule
     *
     * @return EmailMessage
     */
    public function setRecipientCcRule($recipientCcRule)
    {
        $this->recipientCcRule = $recipientCcRule;

        return $this;
    }
    /**
     * {@inheritdoc}
     */
    public function getRecipientCcRule()
    {
        return $this->recipientCcRule;
    }
    /**
     * Set recipientCciRule
     *
     * @param String $recipientCciRule
     *
     * @return EmailMessage
     */
    public function setRecipientCciRule($recipientCciRule)
    {
        $this->recipientCciRule = $recipientCciRule;

        return $this;
    }
    /**
     * {@inheritdoc}
     */
    public function getRecipientCciRule()
    {
        return $this->recipientCciRule;
    }
    /**
     * Get recipientMulti
     *
     * @return array
     */
    public function getRecipientMulti() {
        return $this->recipientMulti;
    }
    /**
     * Set recipientMulti
     *
     * @return Person
     */
    public function setRecipientMulti($recipientMulti) {
        $this->recipientMulti = $recipientMulti;

        return $this;
    }
    /**
     * Sets $mailAttached.
     *
     * @param Mail $mailAttached
     *
     * @return $this
     */
    public function setMailAttached(Mail $mailAttached = null)
    {
        $this->mailAttached = $mailAttached;

        return $this;
    }
    /**
     * Gets $mailAttached.
     *
     * @return Mail
     */
    public function getMailAttached()
    {
        return $this->mailAttached;
    }
    public function getDiscr()
    {
        return 'email';
    }
}
