<?php

/*
 * This file is part of the Serenity package.
 *
 * (c) CP Creation <web@cpcreation.fr>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CpCreation\VitiCore\Behavior\Impl;

use CpCreation\VitiCore\Media\Model\Video as ModelVideo;
use Doctrine\ORM\Mapping as ORM;

trait Video
{
    #[ORM\OneToOne(
        targetEntity: ModelVideo::class,
        cascade: ['persist', 'remove']
    )]
    private ?ModelVideo $video = null;

    public function getVideo(): ?ModelVideo
    {
        return $this->video;
    }

    public function setVideo(?ModelVideo $video): void
    {
        $this->video = $video;
    }
}
