<?php
namespace Nellapp\Bundle\SDKBundle\Google\Entity;
use Nellapp\Bundle\SDKBundle\Google\Entity\GoogleDriveItem\GoogleDriveItem;
use Doctrine\ORM\Mapping as ORM;
use Nellapp\Bundle\SDKBundle\Google\Entity\GoogleDrivePermission\GoogleDrivePermission;
use Nellapp\Bundle\SDKBundle\Google\Repository\GoogleDriveFolderRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
#[ORM\Entity(repositoryClass: GoogleDriveFolderRepository::class)]
#[ORM\Table(name: 'google_drive_folder')]
class GoogleDriveFolder extends GoogleDriveItem
{
#[ORM\OneToMany(targetEntity: GoogleDrivePermission::class, cascade: ['persist', 'remove'], orphanRemoval: true, mappedBy: 'googleDriveFolder')]
private Collection $googleDrivePermissions;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $type = null;
public function __construct() {
$this->googleDrivePermissions = new ArrayCollection();
}
public function getGoogleDrivePermissions(): Collection
{
return $this->googleDrivePermissions;
}
public function setGoogleDrivePermissions(Collection $googleDrivePermissions): GoogleDriveFolder
{
$this->googleDrivePermissions = $googleDrivePermissions;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): GoogleDriveFolder
{
$this->type = $type;
return $this;
}
}