<?php

namespace Lc\SovBundle\Factory\Ticket;

use Lc\SovBundle\Container\Ticket\TicketMessageContainer;
use Lc\SovBundle\Factory\AbstractFactory;
use Lc\SovBundle\Model\Ticket\TicketInterface;
use Lc\SovBundle\Model\Ticket\TicketMessageInterface;

class TicketMessageFactory extends AbstractFactory implements TicketMessageFactoryInterface
{
    public function create(TicketInterface $ticket): TicketMessageInterface
    {
        $class = TicketMessageContainer::getEntityFqcn();
        $ticketMessage = new $class;

        $ticketMessage->setTicket($ticket);
        $ticketMessage->setStatus(1);

        return $ticketMessage;
    }
}
