src/Entity/PipelineIdentiteVisuelleMajMessage.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PipelineIdentiteVisuelleMajMessageRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassPipelineIdentiteVisuelleMajMessageRepository::class)]
  6. class PipelineIdentiteVisuelleMajMessage
  7. {
  8.     public const AUTHOR_CLIENT 'CLIENT';
  9.     public const AUTHOR_AGENCY 'AGENCY';
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private ?int $id null;
  14.     #[ORM\ManyToOne(targetEntityPipelineIdentiteVisuelleMajItem::class, inversedBy'messages')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private ?PipelineIdentiteVisuelleMajItem $item null;
  17.     #[ORM\Column(type'string'length10)]
  18.     private string $author self::AUTHOR_CLIENT;
  19.     #[ORM\Column(type'text')]
  20.     private string $message;
  21.     #[ORM\Column(type'datetime_immutable')]
  22.     private \DateTimeImmutable $createdAt;
  23.     #[ORM\Column(type'integer'nullabletrue)]
  24.     private ?int $step null;
  25.     public function __construct()
  26.     {
  27.         $this->createdAt = new \DateTimeImmutable();
  28.     }
  29.     public function getId(): ?int { return $this->id; }
  30.     public function getItem(): ?PipelineIdentiteVisuelleMajItem { return $this->item; }
  31.     public function setItem(?PipelineIdentiteVisuelleMajItem $item): self $this->item $item; return $this; }
  32.     public function getAuthor(): string { return $this->author; }
  33.     public function setAuthor(string $author): self $this->author $author; return $this; }
  34.     public function getMessage(): string { return $this->message; }
  35.     public function setMessage(string $message): self $this->message $message; return $this; }
  36.     public function getCreatedAt(): \DateTimeImmutable { return $this->createdAt; }
  37.     public function getStep(): ?int { return $this->step; }
  38.     public function setStep(?int $step): self $this->step $step; return $this; }
  39. }