Your IP : 216.73.217.79


Current Path : /var/www/v3.cesa.co.za/src/MailQueueBundle/Entity/
Upload File :
Current File : /var/www/v3.cesa.co.za/src/MailQueueBundle/Entity/BulkMailMessage.php

<?php

namespace App\MailQueueBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]
#[ORM\Table(name: 'Messages')]
class BulkMailMessage
{
    #[ORM\Id]
    #[ORM\Column(name: 'MessageID', type: Types::INTEGER)]
    #[ORM\GeneratedValue]
    private ?int $messageId = null;

    #[ORM\Column(name: 'SentToGroup', type: Types::STRING, length: 255, nullable: true)]
    private ?string $sentToGroup = null;

    #[ORM\Column(name: 'DateSent', type: Types::DATETIME_MUTABLE, nullable: true)]
    private ?\DateTimeInterface $dateSent = null;

    #[ORM\Column(name: 'MessageFrom', type: Types::STRING, length: 255, nullable: true)]
    private ?string $messageFrom = null;

    #[ORM\Column(name: 'Subject', type: Types::STRING, length: 500, nullable: true)]
    private ?string $subject = null;

    #[ORM\Column(name: 'Message', type: Types::TEXT, nullable: true)]
    private ?string $message = null;

    #[ORM\Column(name: 'NumRecipients', type: Types::INTEGER, nullable: true)]
    private ?int $numRecipients = null;

    #[ORM\Column(name: 'SendComplete', type: Types::SMALLINT, nullable: true)]
    private ?int $sendComplete = null;

    #[ORM\Column(name: 'DateComplete', type: Types::DATETIME_MUTABLE, nullable: true)]
    private ?\DateTimeInterface $dateComplete = null;

    #[ORM\Column(name: 'FromSchool', type: Types::SMALLINT, nullable: true)]
    private ?int $fromSchool = null;

    #[ORM\Column(name: 'Prioritise', type: Types::INTEGER, nullable: true)]
    private ?int $prioritise = null;

    /** @var Collection<int, BulkMailToSend> */
    #[ORM\OneToMany(mappedBy: 'message', targetEntity: BulkMailToSend::class)]
    private Collection $toSendRows;

    public function __construct()
    {
        $this->toSendRows = new ArrayCollection();
    }

    public function getMessageId(): ?int
    {
        return $this->messageId;
    }

    public function getSentToGroup(): ?string
    {
        return $this->sentToGroup;
    }

    public function getDateSent(): ?\DateTimeInterface
    {
        return $this->dateSent;
    }

    public function getMessageFrom(): ?string
    {
        return $this->messageFrom;
    }

    public function getSubject(): ?string
    {
        return $this->subject;
    }

    public function getMessage(): ?string
    {
        return $this->message;
    }

    public function getNumRecipients(): ?int
    {
        return $this->numRecipients;
    }

    public function isSendComplete(): bool
    {
        return (int) $this->sendComplete === 1;
    }

    public function getDateComplete(): ?\DateTimeInterface
    {
        return $this->dateComplete;
    }

    public function getFromSchool(): ?int
    {
        return $this->fromSchool;
    }

    public function getPrioritise(): ?int
    {
        return $this->prioritise;
    }

    /** @return Collection<int, BulkMailToSend> */
    public function getToSendRows(): Collection
    {
        return $this->toSendRows;
    }
}