<?php

namespace App\Entity;

use App\Repository\GitRepositoryRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\AbstractEntity;

#[ORM\Entity(repositoryClass: GitRepositoryRepository::class)]
class GitRepository extends AbstractEntity
{
    use NameableTrait;

    #[ORM\Column(length: 255, nullable: true)]
    private ?string $description = null;

    #[ORM\ManyToOne(inversedBy: 'gitRepositories')]
    #[ORM\JoinColumn(onDelete: 'CASCADE')]
    private ?ImageRepository $repository = null;

    public function __construct()
    {
        parent::__construct();
    }


    public function getDescription(): ?string
    {
        return $this->description;
    }

    public function setDescription(?string $description): static
    {
        $this->description = $description;

        return $this;
    }

    public function getRepository(): ?ImageRepository
    {
        return $this->repository;
    }

    public function setRepository(?ImageRepository $repository): static
    {
        $this->repository = $repository;

        return $this;
    }
}
