. */ namespace App\Entity\Attachments; use App\Entity\LabelSystem\LabelProfile; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * A attachment attached to a user element. * * @ORM\Entity() * @UniqueEntity({"name", "attachment_type", "element"}) */ class LabelAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = LabelProfile::class; /** * @var LabelProfile the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\LabelSystem\LabelProfile", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ protected ?AttachmentContainingDBElement $element = null; }