<?php
namespace App\Entity\OperationCode;
use App\Entity\Operation\Draw as OperationDraw;
use App\Entity\Participation\Draw as ParticipationDraw;
use App\Repository\OperationCode\DrawCodeRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\SerializedName;
/**
* @ORM\Entity(repositoryClass=DrawCodeRepository::class)
*/
class DrawCode extends OperationCode
{
/**
* @ORM\ManyToOne(targetEntity=OperationDraw::class)
* @ORM\JoinColumn(name="operation_id")
* @SerializedName("operation")
*/
private OperationDraw $operation;
/**
* @ORM\ManyToOne(targetEntity=ParticipationDraw::class, inversedBy="operationCodes")
* @ORM\JoinColumn(name="participation_id", nullable=true)
* @SerializedName("participation")
*/
private ?ParticipationDraw $participation;
public function getOperation(): OperationDraw
{
return $this->operation;
}
public function setOperation(OperationDraw $operation): DrawCode
{
$this->operation = $operation;
return $this;
}
public function getParticipation(): ?ParticipationDraw
{
return $this->participation;
}
public function setParticipation(ParticipationDraw $participation): self
{
$this->participation = $participation;
return $this;
}
}