<?php
namespace App\Entity;
use App\Repository\PipelineIdentiteVisuelleMajMessageRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PipelineIdentiteVisuelleMajMessageRepository::class)]
class PipelineIdentiteVisuelleMajMessage
{
public const AUTHOR_CLIENT = 'CLIENT';
public const AUTHOR_AGENCY = 'AGENCY';
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: PipelineIdentiteVisuelleMajItem::class, inversedBy: 'messages')]
#[ORM\JoinColumn(nullable: false)]
private ?PipelineIdentiteVisuelleMajItem $item = null;
#[ORM\Column(type: 'string', length: 10)]
private string $author = self::AUTHOR_CLIENT;
#[ORM\Column(type: 'text')]
private string $message;
#[ORM\Column(type: 'datetime_immutable')]
private \DateTimeImmutable $createdAt;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $step = null;
public function __construct()
{
$this->createdAt = new \DateTimeImmutable();
}
public function getId(): ?int { return $this->id; }
public function getItem(): ?PipelineIdentiteVisuelleMajItem { return $this->item; }
public function setItem(?PipelineIdentiteVisuelleMajItem $item): self { $this->item = $item; return $this; }
public function getAuthor(): string { return $this->author; }
public function setAuthor(string $author): self { $this->author = $author; return $this; }
public function getMessage(): string { return $this->message; }
public function setMessage(string $message): self { $this->message = $message; return $this; }
public function getCreatedAt(): \DateTimeImmutable { return $this->createdAt; }
public function getStep(): ?int { return $this->step; }
public function setStep(?int $step): self { $this->step = $step; return $this; }
}