src/Entity/Delete/Reporting/OpsReport.php line 21
<?php
namespace App\Entity\Delete\Reporting;
use ApiPlatform\Metadata\ApiResource;
use DateTimeInterface;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Table(name: 'reporting_ops')]
#[ORM\Entity]
#[ApiResource(
shortName: 'Ops',
routePrefix: '/reporting',
order: ['id' => 'DESC'],
paginationClientEnabled: false,
paginationItemsPerPage: 1
)]
class OpsReport
{
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
#[ORM\SequenceGenerator(sequenceName: 'reporting_ops_id_seq')]
#[ORM\Column(type: Types::INTEGER)]
private int $id;
#[Gedmo\Timestampable(on: 'create')]
#[Assert\Type(type: DateTimeInterface::class)]
#[ORM\Column(type: Types::DATETIMETZ_MUTABLE, options: ['default' => 'CURRENT_TIMESTAMP'])]
protected ?DateTimeInterface $createdAt = null;
#[Assert\Valid]
#[Assert\Type(type: OpsReportData::class)]
#[ORM\Column(type: 'json_document', options: ['jsonb' => true])]
protected OpsReportData $data;
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?DateTimeInterface $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
public function getData(): ?OpsReportData
{
return $this->data;
}
public function setData(?OpsReportData $data): static
{
$this->data = $data;
return $this;
}
}