src/Entity/Olympiad/Online/Participant/Message.php line 14
<?php
namespace App\Entity\Olympiad\Online\Participant;
use App\Entity\Olympiad\Online\Participant;
use App\Entity\Traits\CreatedTrait;
use App\Entity\Traits\DeletedTrait;
use App\Entity\Traits\UpdatedTrait;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'olymp_online_participant_message')]
#[ORM\Entity(repositoryClass: 'App\Repository\Olympiad\Online\MessageRepository')]
#[ORM\HasLifecycleCallbacks]
class Message
{
use CreatedTrait;
use UpdatedTrait;
use DeletedTrait;
public const TYPE_RESULT_WINNER = 'result_winner';
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private ?int $id;
#[ORM\ManyToOne(targetEntity: 'App\Entity\Olympiad\Online\Participant')]
#[ORM\JoinColumn(nullable: false)]
private Participant $participant;
#[ORM\Column(type: 'string')]
private string $type = self::TYPE_RESULT_WINNER;
#[ORM\Column(type: 'boolean')]
private bool $show = true;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $message = null;
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int|null $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return Participant
*/
public function getParticipant(): Participant
{
return $this->participant;
}
/**
* @param Participant $participant
*/
public function setParticipant(Participant $participant): void
{
$this->participant = $participant;
}
/**
* @return string
*/
public function getType(): string
{
return $this->type;
}
/**
* @param string $type
*/
public function setType(string $type): void
{
$this->type = $type;
}
/**
* @return bool
*/
public function isShow(): bool
{
return $this->show;
}
/**
* @param bool $show
*/
public function setShow(bool $show): void
{
$this->show = $show;
}
/**
* @return string|null
*/
public function getMessage(): ?string
{
return $this->message;
}
/**
* @param string|null $message
*/
public function setMessage(?string $message): void
{
$this->message = $message;
}
}