src/Entity/Project.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity()
  6. */
  7. class Project
  8. {
  9. /**
  10. * @ORM\Id
  11. * @ORM\GeneratedValue
  12. * @ORM\Column(type="integer")
  13. */
  14. private $id;
  15. /**
  16. * @ORM\Column(type="string", length=255)
  17. */
  18. private $title;
  19. /**
  20. * @ORM\Column(type="text")
  21. */
  22. private $description;
  23. /**
  24. * @ORM\Column(type="float")
  25. */
  26. private $targetAmount;
  27. /**
  28. * @ORM\Column(type="float")
  29. */
  30. private $currentAmount;
  31. /**
  32. * @ORM\Column(type="string", length=255, nullable=true)
  33. */
  34. private $image;
  35. /**
  36. * @ORM\OneToMany(targetEntity="App\Entity\Donation", mappedBy="project")
  37. */
  38. private $donations;
  39. public function __construct() {
  40. $this->donations = new \Doctrine\Common\Collections\ArrayCollection();
  41. }
  42. public function getId(): ?int { return $this->id; }
  43. public function getTitle(): ?string { return $this->title; }
  44. public function setTitle(string $title): self { $this->title = $title; return $this; }
  45. public function getDescription(): ?string { return $this->description; }
  46. public function setDescription(string $description): self { $this->description = $description; return $this; }
  47. public function getTargetAmount(): ?float { return $this->targetAmount; }
  48. public function setTargetAmount(float $targetAmount): self { $this->targetAmount = $targetAmount; return $this; }
  49. public function getCurrentAmount(): ?float { return $this->currentAmount; }
  50. public function setCurrentAmount(float $currentAmount): self { $this->currentAmount = $currentAmount; return $this; }
  51. public function getImage(): ?string { return $this->image; }
  52. public function setImage(?string $image): self { $this->image = $image; return $this; }
  53. public function getDonations() { return $this->donations; }
  54. }