src/Entity/SesionesValores.php line 50
<?phpnamespace App\Entity;use Symfony\Component\Serializer\Annotation\Groups;use Ramsey\Uuid\Uuid;use Doctrine\ORM\Mapping as ORM;use App\Trait\UuidTrait;use App\State\SesionesValoresStateProcessor;use App\Repository\SesionesValoresRepository;use App\Controller\CreateEvaluacionesActionController;use ApiPlatform\Metadata\Put;use ApiPlatform\Metadata\Post;use ApiPlatform\Metadata\Patch;use ApiPlatform\Metadata\GetCollection;use ApiPlatform\Metadata\Get;use ApiPlatform\Metadata\Delete;use ApiPlatform\Metadata\ApiResource;use ApiPlatform\Metadata\ApiFilter;use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;#[ORM\Entity(repositoryClass: SesionesValoresRepository::class)]#[ApiResource(operations: [new GetCollection(uriTemplate: 'sesionesValores'),// we post an array of evaluations, so we indicate that the input is an arraynew Post(uriTemplate: 'sesionesValores',controller: CreateEvaluacionesActionController::class,stateless: false,denormalizationContext: ['groups' => ['sesionesValores:createBulk']],),new Get(uriTemplate: 'sesionesValores/{uuid}'),new Put(uriTemplate: 'sesionesValores/{uuid}', denormalizationContext: ['groups' => ['sesionesValores:update']]),new Patch(uriTemplate: 'sesionesValores/{uuid}', denormalizationContext: ['groups' => ['sesionesValores:update']]),new Delete(uriTemplate: 'sesionesValores/{uuid}'),],normalizationContext: ['groups' => ['sesionesValores:read', 'uuid']],)]#[ApiFilter(SearchFilter::class,properties: ['empresa.uuid' => 'exact','evaluador.uuid' => 'exact','muestra.uuid' => 'exact','productoParametro.uuid' => 'exact','sesion.uuid' => 'exact',])]class SesionesValores{use UuidTrait;#[Groups(['sesionesValores:read', 'sesion:read'])]#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?Empresa $empresa = null;#[Groups(['sesionesValores:read', 'sesionesValores:create', 'sesionesValores:update'])]#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?User $evaluador = null;#[Groups(['sesionesValores:read', 'sesionesValores:create', 'sesionesValores:update'])]#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]private ?Muestra $muestra = null;#[Groups(['sesionesValores:read', 'sesionesValores:create', 'sesionesValores:update'])]#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?ProductoParametros $productoParametro = null;#[Groups(['sesionesValores:read', 'sesionesValores:create', 'sesionesValores:update'])]#[ORM\Column(length: 255, nullable: true)]private ?string $valor = null;#[Groups(['sesionesValores:read', 'sesionesValores:create', 'sesionesValores:update'])]#[ORM\Column(nullable: true)]private ?bool $isEvaluado = null;#[Groups(['sesionesValores:read', 'sesionesValores:create', 'sesionesValores:update'])]#[ORM\Column(nullable: true)]private ?bool $isCumple = null;#[Groups(['sesionesValores:read', 'sesionesValores:create', 'sesionesValores:update'])]#[ORM\ManyToOne(inversedBy: 'sesionesValores')]#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]private ?Sesion $sesion = null;#[Groups(['sesionesValores:read'])]#[ORM\Column(nullable: true)]private array $parametros = [];#[Groups(['sesionesValores:createBulk'])]private ?array $mixed = null;public function __construct(){$this->uuid = Uuid::uuid4()->toString();}public function getEmpresa(): ?Empresa{return $this->empresa;}public function setEmpresa(?Empresa $empresa): self{$this->empresa = $empresa;return $this;}public function getEvaluador(): ?User{return $this->evaluador;}public function setEvaluador(?User $evaluador): self{$this->evaluador = $evaluador;return $this;}public function getMuestra(): ?Muestra{return $this->muestra;}public function setMuestra(?Muestra $muestra): self{$this->muestra = $muestra;return $this;}public function getProductoParametro(): ?ProductoParametros{return $this->productoParametro;}public function setProductoParametro(?ProductoParametros $productoParametro): self{$this->productoParametro = $productoParametro;return $this;}public function getValor(): ?string{return $this->valor;}public function setValor(?string $valor): self{$this->valor = $valor;return $this;}public function isIsEvaluado(): ?bool{return $this->isEvaluado;}public function setIsEvaluado(?bool $isEvaluado): self{$this->isEvaluado = $isEvaluado;return $this;}public function isIsCumple(): ?bool{return $this->isCumple;}public function setIsCumple(?bool $isCumple): self{$this->isCumple = $isCumple;return $this;}public function getSesion(): ?Sesion{return $this->sesion;}public function setSesion(?Sesion $sesion): self{$this->sesion = $sesion;return $this;}public function getParametros(): array{return $this->parametros;}public function setParametros(?array $parametros): self{$this->parametros = $parametros;return $this;}public function getMixed(): ?array { return $this->mixed; }public function setMixed(?array $mixed): self { $this->mixed = $mixed; return $this; }}