Project.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?php
  2. /**
  3. * @Entity @Table(name="projects_locotech")
  4. */
  5. class Project extends BaseDBO
  6. {
  7. /**
  8. * One project has many tasks. This is the inverse side.
  9. * @OneToMany(targetEntity="Task", mappedBy="project")
  10. */
  11. private $tasks;
  12. /**
  13. * @ManyToOne(targetEntity="ProjectType", inversedBy="project")
  14. * @JoinColumn(name="action", referencedColumnName="id")
  15. */
  16. private $projectTypes;
  17. public function __construct() {
  18. $this->projectTypes = new \Doctrine\Common\Collections\ArrayCollection();
  19. $this->tasks = new \Doctrine\Common\Collections\ArrayCollection();
  20. }
  21. public function getTasks(): Task
  22. {
  23. return $this->tasks;
  24. }
  25. public function addTask(Task $task)
  26. {
  27. $this->tasks[] = $task;
  28. }
  29. public function getActions(): ProjectType
  30. {
  31. return $this->actions;
  32. }
  33. public function setActions(ProjectType $actions)
  34. {
  35. $this->actions = $actions;
  36. }
  37. /**
  38. * @Id @Column(type="integer") @GeneratedValue
  39. */
  40. private $id;
  41. /**
  42. * @var integer
  43. *
  44. * @Column(type="integer")
  45. */
  46. private $action;
  47. /**
  48. * @var integer
  49. *
  50. * @Column(type="integer")
  51. */
  52. private $company;
  53. /**
  54. * @var boolean
  55. *
  56. * @Column(type="smallint")
  57. */
  58. private $status;
  59. /**
  60. * @var string
  61. *
  62. * @Column(type="string")
  63. */
  64. private $locoType;
  65. /**
  66. * @var integer
  67. *
  68. * @Column(type="integer")
  69. */
  70. private $locoNumber;
  71. /**
  72. * @var string
  73. *
  74. * @Column(type="string")
  75. */
  76. private $depo;
  77. /**
  78. * @var string
  79. *
  80. * @Column(type="string")
  81. */
  82. private $depoService;
  83. /**
  84. * @var \DateTime
  85. *
  86. * @Column(type="datetime")
  87. */
  88. private $created;
  89. // /**
  90. // * @var string
  91. // *
  92. // * @Column(type="string")
  93. // */
  94. // private $tasks;
  95. public function getId()
  96. {
  97. return $this->id;
  98. }
  99. public function getAction()
  100. {
  101. return $this->action;
  102. }
  103. public function setAction(int $action)
  104. {
  105. $this->action = $action;
  106. return $this;
  107. }
  108. public function getCompany()
  109. {
  110. return $this->company;
  111. }
  112. public function setCompany(int $company)
  113. {
  114. $this->company = $company;
  115. return $this;
  116. }
  117. public function getStatus()
  118. {
  119. return $this->status;
  120. }
  121. public function setStatus(bool $status)
  122. {
  123. $this->status = $status;
  124. return $this;
  125. }
  126. public function getLocoType()
  127. {
  128. return $this->locoType;
  129. }
  130. public function setLocoType(string $locoType)
  131. {
  132. $this->locoType = $locoType;
  133. return $this;
  134. }
  135. public function getLocoNumber()
  136. {
  137. return $this->locoNumber;
  138. }
  139. public function setLocoNumber(int $locoNumber)
  140. {
  141. $this->locoNumber = $locoNumber;
  142. return $this;
  143. }
  144. public function getDepo()
  145. {
  146. return $this->depo;
  147. }
  148. public function setDepo(string $depo)
  149. {
  150. $this->depo = $depo;
  151. return $this;
  152. }
  153. public function getDepoService()
  154. {
  155. return $this->depoService;
  156. }
  157. public function setDepoService(string $depoService)
  158. {
  159. $this->depoService = $depoService;
  160. return $this;
  161. }
  162. public function getCreated()
  163. {
  164. return $this->created;
  165. }
  166. public function setCreated(\DateTimeInterface $created)
  167. {
  168. $this->created = $created;
  169. return $this;
  170. }
  171. }