<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
*/
class Project
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $title;
/**
* @ORM\Column(type="text")
*/
private $description;
/**
* @ORM\Column(type="float")
*/
private $targetAmount;
/**
* @ORM\Column(type="float")
*/
private $currentAmount;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $image;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Donation", mappedBy="project")
*/
private $donations;
public function __construct() {
$this->donations = new \Doctrine\Common\Collections\ArrayCollection();
}
public function getId(): ?int { return $this->id; }
public function getTitle(): ?string { return $this->title; }
public function setTitle(string $title): self { $this->title = $title; return $this; }
public function getDescription(): ?string { return $this->description; }
public function setDescription(string $description): self { $this->description = $description; return $this; }
public function getTargetAmount(): ?float { return $this->targetAmount; }
public function setTargetAmount(float $targetAmount): self { $this->targetAmount = $targetAmount; return $this; }
public function getCurrentAmount(): ?float { return $this->currentAmount; }
public function setCurrentAmount(float $currentAmount): self { $this->currentAmount = $currentAmount; return $this; }
public function getImage(): ?string { return $this->image; }
public function setImage(?string $image): self { $this->image = $image; return $this; }
public function getDonations() { return $this->donations; }
}