<?php
namespace App\Entity;
use App\Repository\WorkoutDataRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: WorkoutDataRepository::class)]
class WorkoutData
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(nullable: true)]
private ?array $jsonData = null;
public function getId(): ?int
{
return $this->id;
}
public function getJsonData()
{
return json_encode($this->jsonData);
}
public function setJsonData($jsonData): static
{
$this->jsonData = json_decode(json_encode($jsonData), true);
return $this;
}
}