<?php
namespace App\Entity\Purse;
use App\Entity\Participation\Refund;
use App\Repository\Purse\ItemRepository;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Core\Annotation\ApiResource;
/**
* @ApiResource(
* attributes={
* "normalization_context"={"groups"={"Purse:io","Purse:output"}},
* "denormalization_context"={"groups"={"Purse:io","Purse:input"}}
* },
* collectionOperations={
* "get"={
* "method"="GET",
* "access_control"="is_granted('ROLE_USER')",
* },
* },
* itemOperations={
* "get"={
* "method"="GET",
* "access_control"="is_granted('ROLE_USER')",
* },
* }
* )
* @ORM\Entity(repositoryClass=ItemRepository::class)
*/
class ItemStep extends Item
{
/**
* @ORM\ManyToOne(targetEntity=Refund::class, inversedBy="items")
* @ORM\JoinColumn(nullable=true, name="burner_id")
*/
private $refund;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*/
private $class;
public function getRefund(): ?Refund
{
return $this->refund;
}
public function setRefund(Refund $refund): self
{
$this->class = Refund::class;
$this->refund = $refund;
return $this;
}
}