src/Entity/Journal.php line 15
<?phpnamespace App\Entity;use ApiPlatform\Doctrine\Orm\Filter\DateFilter;use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;use ApiPlatform\Metadata\ApiFilter;use ApiPlatform\Metadata\ApiResource;use App\Repository\JournalRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: JournalRepository::class)]#[ApiResource(order: ['id' => 'DESC'])]class Journal{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne(inversedBy: 'journals')]#[ORM\JoinColumn(nullable: true)]#[ApiFilter(SearchFilter::class, strategy: 'exact')]private ?User $user = null;#[ORM\Column]#[ApiFilter(DateFilter::class, properties: ["createdAt"])]private ?\DateTimeImmutable $createdAt = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $info = null;#[ORM\Column(length: 255, nullable: true)]private ?string $ip = null;#[ORM\Column(nullable: true)]private ?int $object_id = null;#[ORM\Column(length: 255, nullable: true)]#[ApiFilter(SearchFilter::class, strategy: 'exact')]private ?string $entity = null;public function getId(): ?int{return $this->id;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): static{$this->user = $user;return $this;}public function getCreatedAt(): ?\DateTimeImmutable{return $this->createdAt;}public function setCreatedAt(\DateTimeImmutable $createdAt): static{$this->createdAt = $createdAt;return $this;}public function getInfo(): ?string{return $this->info;}public function setInfo(?string $info): static{$this->info = $info;return $this;}public function getIp(): ?string{return $this->ip;}public function setIp(?string $ip): static{$this->ip = $ip;return $this;}public function getObjectId(): ?int{return $this->object_id;}public function setObjectId(?int $object_id): static{$this->object_id = $object_id;return $this;}public function getEntity(): ?string{return $this->entity;}public function setEntity(?string $entity): static{$this->entity = $entity;return $this;}public function getUserName(): string{return $this->user ? $this->user->getDisplayName() : '';}}