<?php

namespace App\Entity;

use App\Repository\ActivityOSCRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass=ActivityOSCRepository::class)
 */
class ActivityOSC
{
    /**
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=1023)
     */
    private $name;

    /**
     * @ORM\Column(type="string", length=16, nullable=true)
     */
    private $code;

    /**
     * @ORM\ManyToOne(targetEntity=Accelerator::class, inversedBy="activitySocieties")
     * @ORM\JoinColumn(nullable=false)
     */
    private $accelerator;

    /**
     * @ORM\Column(type="bigint")
     */
    private $expectedCost;

    /**
     * @ORM\Column(type="integer")
     */
    private $year;

    /**
     * @ORM\Column(type="bigint", nullable=true)
     */
    private $realizedCost;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $achievement;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $constraints;

    /**
     * @ORM\ManyToOne(targetEntity=Mainstay::class, inversedBy="activityOSCs")
     * @ORM\JoinColumn(nullable=false)
     */
    private $mainstay;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    private $executed;

    /**
     * @ORM\ManyToOne(targetEntity=Goal::class, inversedBy="activityOSCs")
     */
    private $goal;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $observations;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $factors;

    public function __construct()
    {
        $this->suivis = new ArrayCollection();
    }

    public function __toString()
    {
        return $this->getCode() . ' - ' . $this->getName();
    }

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getName(): ?string
    {
        return $this->name;
    }

    public function setName(string $name): self
    {
        $this->name = $name;

        return $this;
    }

    public function getCode(): ?string
    {
        return $this->code;
    }

    public function setCode(string $code): self
    {
        $this->code = $code;

        return $this;
    }

    public function getAccelerator(): ?Accelerator
    {
        return $this->accelerator;
    }

    public function setAccelerator(?Accelerator $accelerator): self
    {
        $this->accelerator = $accelerator;

        return $this;
    }

    public function getExpectedCost(): ?string
    {
        return $this->expectedCost;
    }

    public function setExpectedCost(string $expectedCost): self
    {
        $this->expectedCost = $expectedCost;

        return $this;
    }

    public function getYear(): ?int
    {
        return $this->year;
    }

    public function setYear(int $year): self
    {
        $this->year = $year;

        return $this;
    }

    public function getRealizedCost(): ?string
    {
        return $this->realizedCost;
    }

    public function setRealizedCost(?string $realizedCost): self
    {
        $this->realizedCost = $realizedCost;

        return $this;
    }

    public function getAchievement(): ?string
    {
        return $this->achievement;
    }

    public function setAchievement(?string $achievement): self
    {
        $this->achievement = $achievement;

        return $this;
    }

    public function getConstraints(): ?string
    {
        return $this->constraints;
    }

    public function setConstraints(?string $constraints): self
    {
        $this->constraints = $constraints;

        return $this;
    }

    public function getMainstay(): ?Mainstay
    {
        return $this->mainstay;
    }

    public function setMainstay(?Mainstay $mainstay): self
    {
        $this->mainstay = $mainstay;

        return $this;
    }

    public function getExecuted(): ?bool
    {
        return $this->executed;
    }

    public function setExecuted(bool $executed): self
    {
        $this->executed = $executed;

        return $this;
    }

    public function getGoal(): ?Goal
    {
        return $this->goal;
    }

    public function setGoal(?Goal $goal): self
    {
        $this->goal = $goal;

        return $this;
    }

    public function getObservations(): ?string
    {
        return $this->observations;
    }

    public function setObservations(?string $observations): self
    {
        $this->observations = $observations;

        return $this;
    }

    public function getFactors(): ?string
    {
        return $this->factors;
    }

    public function setFactors(?string $factors): self
    {
        $this->factors = $factors;

        return $this;
    }
}
