src/Entity/ApiChangeHistory.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ApiChangeHistoryRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Table(name="api_change_history", indexes={
  7.  *     @ORM\Index(name="IDX_33A1856A8F52DFEE", columns={"resource_path"}),
  8.  *     @ORM\Index(name="IDX_33A1856AB03A8386", columns={"created_at"})
  9.  * })
  10.  * @ORM\Entity(repositoryClass=ApiChangeHistoryRepository::class)
  11.  */
  12. class ApiChangeHistory
  13. {
  14.     /**
  15.      * @ORM\Id()
  16.      * @ORM\GeneratedValue()
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private ?int $id null;
  20.     /**
  21.      * @ORM\Column(name="resource_path", type="string", length=1024)
  22.      */
  23.     private string $resourcePath;
  24.     /**
  25.      * @ORM\Column(name="http_method", type="string", length=10)
  26.      */
  27.     private string $httpMethod;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity", inversedBy="apiChanges")
  30.      * @ORM\JoinColumn(name="dnsit_entity_id", referencedColumnName="id", nullable=true)
  31.      */
  32.     private $dnsitEntity null;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  35.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
  36.      */
  37.     private $user null;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private ?string $username null;
  42.     /**
  43.      * @ORM\Column(name="request_payload", type="json", nullable=true)
  44.      */
  45.     private ?array $requestPayload null;
  46.     /**
  47.      * @ORM\Column(name="changes_payload", type="json", nullable=true)
  48.      */
  49.     private ?array $changesPayload null;
  50.     /**
  51.      * @ORM\Column(name="created_at", type="datetime_immutable")
  52.      */
  53.     private \DateTimeImmutable $createdAt;
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getResourcePath(): string
  59.     {
  60.         return $this->resourcePath;
  61.     }
  62.     public function setResourcePath(string $resourcePath): self
  63.     {
  64.         $this->resourcePath $resourcePath;
  65.         return $this;
  66.     }
  67.     public function getHttpMethod(): string
  68.     {
  69.         return $this->httpMethod;
  70.     }
  71.     public function setHttpMethod(string $httpMethod): self
  72.     {
  73.         $this->httpMethod $httpMethod;
  74.         return $this;
  75.     }
  76.     public function getDnsitEntity(): ?DnsitEntity
  77.     {
  78.         return $this->dnsitEntity;
  79.     }
  80.     public function setDnsitEntity(?DnsitEntity $dnsitEntity): self
  81.     {
  82.         $this->dnsitEntity $dnsitEntity;
  83.         return $this;
  84.     }
  85.     public function getUser(): ?User
  86.     {
  87.         return $this->user;
  88.     }
  89.     public function setUser(?User $user): self
  90.     {
  91.         $this->user $user;
  92.         return $this;
  93.     }
  94.     public function getUsername(): ?string
  95.     {
  96.         return $this->username;
  97.     }
  98.     public function setUsername(?string $username): self
  99.     {
  100.         $this->username $username;
  101.         return $this;
  102.     }
  103.     public function getRequestPayload(): ?array
  104.     {
  105.         return $this->requestPayload;
  106.     }
  107.     public function setRequestPayload(?array $requestPayload): self
  108.     {
  109.         $this->requestPayload $requestPayload;
  110.         return $this;
  111.     }
  112.     public function getChangesPayload(): ?array
  113.     {
  114.         return $this->changesPayload;
  115.     }
  116.     public function setChangesPayload(?array $changesPayload): self
  117.     {
  118.         $this->changesPayload $changesPayload;
  119.         return $this;
  120.     }
  121.     public function getCreatedAt(): \DateTimeImmutable
  122.     {
  123.         return $this->createdAt;
  124.     }
  125.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  126.     {
  127.         $this->createdAt $createdAt;
  128.         return $this;
  129.     }
  130. }