src/Entity/LogHistory.php line 17

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\LogHistoryRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Loggable\Entity\MappedSuperclass\AbstractLogEntry;
  7. #[ORM\Entity(repositoryClassLogHistoryRepository::class)]
  8. #[ApiResource]
  9. #[ORM\Table(options: ['row_format' => 'DYNAMIC'])]
  10. #[ORM\Index(name'log_class_lookup_idx'columns: ['object_class'])]
  11. #[ORM\Index(name'log_date_lookup_idx'columns: ['logged_at'])]
  12. #[ORM\Index(name'log_user_lookup_idx'columns: ['username'])]
  13. #[ORM\Index(name'log_version_lookup_idx'columns: ['object_id''object_class''version'])]
  14. class LogHistory extends AbstractLogEntry
  15. {
  16.     /**
  17.      * Get data
  18.      *
  19.      * @return array|null
  20.      */
  21.     public function getData()
  22.     {
  23.         return (array)$this->data;
  24.     }
  25. }