Addind API endpoint for savedExport

This commit is contained in:
Lucas Silva
2023-04-25 13:43:55 +02:00
parent bef1d6b4a3
commit 60c9e037a6
4 changed files with 95 additions and 7 deletions

View File

@@ -19,6 +19,7 @@ use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity
@@ -33,6 +34,7 @@ class SavedExport implements TrackCreationInterface, TrackUpdateInterface
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
* @Assert\NotBlank
* @Groups({"read"})
*/
private string $description = '';
@@ -45,22 +47,26 @@ class SavedExport implements TrackCreationInterface, TrackUpdateInterface
* @ORM\Id
* @ORM\Column(name="id", type="uuid", unique="true")
* @ORM\GeneratedValue(strategy="NONE")
* @Groups({"read"})
*/
private UuidInterface $id;
/**
* @ORM\Column(type="json", nullable=false, options={"default": "[]"})
* @Groups({"read"})
*/
private array $options = [];
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
* @Assert\NotBlank
* @Groups({"read"})
*/
private string $title = '';
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @Groups({"read"})
*/
private User $user;