ProjectType.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /**
  3. * @Entity @Table(name="projecttypes")
  4. */
  5. class ProjectType extends BaseDBO
  6. {
  7. /**
  8. * One product has many features. This is the inverse side.
  9. * @OneToMany(targetEntity="Project", mappedBy="projecttypes")
  10. */
  11. private $projects;
  12. /**
  13. * Many ProjectType have Many Tasktypes.
  14. * @ManyToMany(targetEntity="Tasktype",inversedBy="projecttypes")
  15. * @JoinTable(name="projecttypes_tasktypes")
  16. */
  17. private $tasktypes;
  18. public function __construct() {
  19. $this->tasktypes = new \Doctrine\Common\Collections\ArrayCollection();
  20. $this->projects = new \Doctrine\Common\Collections\ArrayCollection();
  21. }
  22. /** @Id @Column(type="integer") @GeneratedValue */
  23. private $id;
  24. /**
  25. * @Column(type="string")
  26. */
  27. private $name;
  28. /**
  29. * @Column(type="string")
  30. */
  31. private $company;
  32. public function getTasktypes()
  33. {
  34. return $this->tasktypes;
  35. }
  36. public function getId()
  37. {
  38. return $this->id;
  39. }
  40. public function getName()
  41. {
  42. return $this->name;
  43. }
  44. public function setName(string $name)
  45. {
  46. $this->name = $name;
  47. return $this;
  48. }
  49. public function getCompany()
  50. {
  51. return $this->company;
  52. }
  53. public function setCompany(int $company)
  54. {
  55. $this->company = $company;
  56. return $this;
  57. }
  58. //
  59. // public function addProject(Project $projectslocotech): self
  60. // {
  61. // if (!$this->projects->contains($projectslocotech)) {
  62. // $this->projects[] = $projectslocotech;
  63. // $projectslocotech->setActions($this);
  64. // }
  65. //
  66. // return $this;
  67. // }
  68. //
  69. // public function removeProject(Project $projectslocotech): self
  70. // {
  71. // if ($this->projects->contains($projectslocotech)) {
  72. // $this->projects->removeElement($projectslocotech);
  73. // // set the owning side to null (unless already changed)
  74. // if ($projectslocotech->getActions() === $this) {
  75. // $projectslocotech->setActions(null);
  76. // }
  77. // }
  78. //
  79. // return $this;
  80. // }
  81. }