murph-core/src/core/Entity/FileInformation.php

43 lines
887 B
PHP
Raw Normal View History

2022-03-13 19:32:32 +01:00
<?php
namespace App\Core\Entity;
use App\Repository\Entity\FileInformationRepository;
use Doctrine\ORM\Mapping as ORM;
2022-11-19 19:35:28 +01:00
#[ORM\Entity(repositoryClass: FileInformationRepository::class)]
2022-03-13 19:32:32 +01:00
class FileInformation implements EntityInterface
{
2022-11-19 19:35:28 +01:00
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'NONE')]
#[ORM\Column(type: 'string', length: 96, unique: true)]
2022-03-13 19:32:32 +01:00
protected $id;
2022-11-19 19:35:28 +01:00
#[ORM\Column(type: 'text', nullable: true)]
2022-03-13 19:32:32 +01:00
protected $attributes;
public function getId(): ?string
{
return $this->id;
}
public function setId(string $id): self
{
$this->id = $id;
return $this;
}
public function getAttributes()
{
return (array) json_decode($this->attributes, true);
}
public function setAttributes($attributes): self
{
$this->attributes = json_encode($attributes);
return $this;
}
}