src/Entity/LogHistory.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LogHistoryRepository;
  4. use DateTimeImmutable;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\UX\Turbo\Attribute\Broadcast;
  8. #[ORM\Entity(repositoryClassLogHistoryRepository::class)]
  9. #[Broadcast]
  10. class LogHistory
  11. {
  12.     use IdentifiableTrait;
  13.     #[ORM\Column(typeTypes::DATETIME_IMMUTABLE)]
  14.     private ?DateTimeImmutable $date null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $status null;
  17.     #[ORM\ManyToOne(inversedBy'logHistory')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?User $user null;
  20.     #[ORM\ManyToOne(inversedBy'logHistories')]
  21.     #[ORM\JoinColumn(nullablefalse)]
  22.     private ?LogHistoryCategory $category null;
  23.     #[ORM\Column(length5000nullabletrue)]
  24.     private ?string $message null;
  25.     #[ORM\ManyToOne(inversedBy'logHistories')]
  26.     private ?User $targetUser null;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getDate(): ?DateTimeImmutable
  32.     {
  33.         return $this->date;
  34.     }
  35.     public function setDate(DateTimeImmutable $date): self
  36.     {
  37.         $this->date $date;
  38.         return $this;
  39.     }
  40.     public function getStatus(): ?string
  41.     {
  42.         return $this->status;
  43.     }
  44.     public function setStatus(string $status): self
  45.     {
  46.         $this->status $status;
  47.         return $this;
  48.     }
  49.     public function getUser(): ?User
  50.     {
  51.         return $this->user;
  52.     }
  53.     public function setUser(?User $user): self
  54.     {
  55.         $this->user $user;
  56.         return $this;
  57.     }
  58.     public function getCategory(): ?LogHistoryCategory
  59.     {
  60.         return $this->category;
  61.     }
  62.     public function setCategory(?LogHistoryCategory $category): self
  63.     {
  64.         $this->category $category;
  65.         return $this;
  66.     }
  67.     public function getMessage(): ?string
  68.     {
  69.         return $this->message;
  70.     }
  71.     public function setMessage(?string $message): self
  72.     {
  73.         $this->message $message;
  74.         return $this;
  75.     }
  76.     public function getTargetUser(): ?User
  77.     {
  78.         return $this->targetUser;
  79.     }
  80.     public function setTargetUser(?User $targetUser): self
  81.     {
  82.         $this->targetUser $targetUser;
  83.         return $this;
  84.     }
  85. }