<?php
declare(strict_types=1);
namespace App\Entity\Core;
use App\Entity\Core\SelfStudy\SelfStudyTypicalExamProblemElement;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
#[ORM\Table(name: 'relation_self_study_typical_exam_problem_element_image_reference')]
#[ORM\UniqueConstraint(name: 'uniq_self_study_typical_exam_problem_element_image', columns: ['self_study_typical_exam_problem_element_id', 'image_reference_id'])]
class RelationSelfStudyTypicalExamProblemElementImageReference
{
#[ORM\Id]
#[ORM\ManyToOne(targetEntity: SelfStudyTypicalExamProblemElement::class, inversedBy: 'imageReferences')]
#[ORM\JoinColumn(name: 'self_study_typical_exam_problem_element_id', referencedColumnName: 'id', nullable: false)]
private SelfStudyTypicalExamProblemElement $selfStudyTypicalExamProblemElement;
#[ORM\Id]
#[ORM\OneToOne(targetEntity: ImageReference::class, cascade: ['remove'])]
#[ORM\JoinColumn(name: 'image_reference_id', referencedColumnName: 'id', unique: true, nullable: false)]
private ImageReference $imageReference;
#[ORM\Column(type: 'integer')]
private ?int $sorting;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $width;
public function getSelfStudyTypicalExamProblemElement(): SelfStudyTypicalExamProblemElement
{
return $this->selfStudyTypicalExamProblemElement;
}
/**
* @return $this
*/
public function setSelfStudyTypicalExamProblemElement(SelfStudyTypicalExamProblemElement $selfStudyTypicalExamProblemElement): self
{
$this->selfStudyTypicalExamProblemElement = $selfStudyTypicalExamProblemElement;
return $this;
}
public function getImageReference(): ImageReference
{
return $this->imageReference;
}
/**
* @return $this
*/
public function setImageReference(ImageReference $imageReference): self
{
$this->imageReference = $imageReference;
return $this;
}
public function getSorting(): ?int
{
return $this->sorting;
}
/**
* @return $this
*/
public function setSorting(int $sorting): self
{
$this->sorting = $sorting;
return $this;
}
public function getWidth(): ?int
{
return $this->width;
}
public function setWidth(?int $width): void
{
$this->width = $width;
}
}