<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * @ORM\Entity()
 */
class FileAssociationComment extends FileAssociationAbstract
{
    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\CommentAbstract", inversedBy="files")
     * @ORM\JoinColumn(onDelete="CASCADE")
     * @Assert\NotBlank()
     */
    private $comment;

    public function getComment()
    {
        return $this->comment;
    }

    /**
     * @param CommentAbstract|null $comment
     */
    public function setComment(?CommentAbstract $comment)
    {
        $this->comment = $comment;

        return $this;
    }
}
