src/Entity/Goal.php line 19
<?phpdeclare(strict_types=1);namespace App\Entity;use ApiPlatform\Core\Annotation\ApiResource;use App\Entity\Mapped\NamedEntity;use App\Repository\GoalRepository;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: GoalRepository::class)]#[ORM\Table(name: 'goal')]#[ApiResource]class Goal extends NamedEntity{#[ORM\ManyToOne(targetEntity: Project::class,inversedBy: 'goals')]#[ORM\JoinColumn(name: 'project')]private ?Project $project = null;#[ORM\OneToMany(mappedBy: 'goal',targetEntity: Indicator::class,cascade: ['persist'],fetch: 'EXTRA_LAZY',orphanRemoval: true)]private ?iterable $indicators;public function getProject(): ?Project{return $this->project;}public function setProject(?Project $project): self{$this->project = $project;return $this;}}