Projecttypes.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. /**
  3. * @Entity @Table(name="project_types")
  4. */
  5. class Projecttypes
  6. {
  7. /**
  8. * Many Jobtypes have Many Tasktypes.
  9. * @ManyToMany(targetEntity="Tasktype",inversedBy="Projecttypes")
  10. * @JoinTable(name="projectstypes_tasktypes",)
  11. */
  12. private $tasktypes_rel;
  13. /**
  14. * @ORM\OneToMany(targetEntity="App\Entity\ProjectsLocotech", mappedBy="project_types")
  15. */
  16. private $projectslocotech;
  17. public function __construct()
  18. {
  19. $this->projectslocotech = new ArrayCollection();
  20. $this->tasktypes_rel = new ArrayCollection();
  21. }
  22. /**
  23. * @return Collection|ProjectsLocotech[]
  24. */
  25. public function getProjectsLocotech()
  26. {
  27. return $this->projectslocotech;
  28. }
  29. /**
  30. * @var integer
  31. *
  32. ** @Id @Column(type="integer") @GeneratedValue */
  33. private $id;
  34. /**
  35. * @var string
  36. *
  37. * @Column(type="string")
  38. */
  39. private $name;
  40. /**
  41. * @var string
  42. *
  43. * @Column(type="string")
  44. */
  45. private $inputKeyword;
  46. /**
  47. * @var integer
  48. *
  49. * @Column(type="integer")
  50. */
  51. private $company;
  52. /**
  53. * @var string
  54. *
  55. * @Column(type="string")
  56. */
  57. private $tasktypes;
  58. public function getId()
  59. {
  60. return $this->id;
  61. }
  62. public function getName()
  63. {
  64. return $this->name;
  65. }
  66. public function setName(string $name)
  67. {
  68. $this->name = $name;
  69. return $this;
  70. }
  71. public function getInputKeyword()
  72. {
  73. return $this->inputKeyword;
  74. }
  75. public function setInputKeyword(string $inputKeyword)
  76. {
  77. $this->inputKeyword = $inputKeyword;
  78. return $this;
  79. }
  80. public function getCompany()
  81. {
  82. return $this->company;
  83. }
  84. public function setCompany(int $company)
  85. {
  86. $this->company = $company;
  87. return $this;
  88. }
  89. public function getTasktypes()
  90. {
  91. return $this->tasktypes;
  92. }
  93. public function setTasktypes(string $tasktypes)
  94. {
  95. $this->tasktypes = $tasktypes;
  96. return $this;
  97. }
  98. public function getTasktypesRel()
  99. {
  100. return $this->tasktypes_rel;
  101. }
  102. public function addProjectslocotech(ProjectsLocotech $projectslocotech): self
  103. {
  104. if (!$this->projectslocotech->contains($projectslocotech)) {
  105. $this->projectslocotech[] = $projectslocotech;
  106. $projectslocotech->setActions($this);
  107. }
  108. return $this;
  109. }
  110. public function removeProjectslocotech(ProjectsLocotech $projectslocotech): self
  111. {
  112. if ($this->projectslocotech->contains($projectslocotech)) {
  113. $this->projectslocotech->removeElement($projectslocotech);
  114. // set the owning side to null (unless already changed)
  115. if ($projectslocotech->getActions() === $this) {
  116. $projectslocotech->setActions(null);
  117. }
  118. }
  119. return $this;
  120. }
  121. public function addTasktypesProjecttypes(Tasktype $taskType)
  122. {
  123. return $this->tasktypes_rel[] = $taskType;
  124. }
  125. }