<?php
namespace App\Entity\Channel;
use App\Repository\Channel\DriveRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Nellapp\Bundle\SDKBundle\Drive\Entity\DriveInterface;
use Nellapp\Bundle\SDKBundle\Drive\Entity\DriveTrait;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: DriveRepository::class)]
class Drive implements DriveInterface
{
use DriveTrait;
#[ORM\Id,
ORM\GeneratedValue(strategy: 'NONE'),
ORM\Column(type: 'string', length: 36)]
private ?string $id = null;
#[ORM\OneToMany(mappedBy: 'drive', targetEntity: DriveFile::class)]
private Collection $files;
#[ORM\ManyToOne(inversedBy: 'drives')]
private ?Channel $channel = null;
#[ORM\Column(length: 255)]
private ?string $type = null;
public function __construct(Channel $channel)
{
$this->id = Uuid::v4()->toRfc4122();
$this->channel = $channel;
$this->files = new ArrayCollection();
}
}