Account.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <?php
  2. use Doctrine\Common\Collections\ArrayCollection;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity @ORM\Table(name="accounts")
  7. */
  8. class Account extends BaseDBO
  9. {
  10. /**
  11. * Many Jobtypes have Many Accounts.
  12. * @ORM\ManyToMany(targetEntity="Jobtype",inversedBy="Account")
  13. * @ORM\JoinTable(name="accounts_jobtypes",)
  14. */
  15. private $jobtypes_rel;
  16. public function __construct() {
  17. $this->jobtypes_rel = new ArrayCollection();
  18. }
  19. /**
  20. * @ORM\Id @ORM\Column(type="integer") @ORM\GeneratedValue
  21. */
  22. private $id;
  23. /**
  24. * @var string
  25. *
  26. * @ORM\Column(type="string")
  27. */
  28. private $name;
  29. /**
  30. * @var boolean
  31. *
  32. * @ORM\Column(type="boolean")
  33. */
  34. private $cmdlevel;
  35. /**
  36. * @var string
  37. *
  38. * @ORM\Column(type="string")
  39. */
  40. private $phone;
  41. /**
  42. * @var string
  43. *
  44. * @ORM\Column(type="string")
  45. */
  46. private $password;
  47. /**
  48. * @var string
  49. *
  50. * @ORM\Column(type="string")
  51. */
  52. private $login;
  53. /**
  54. * @var string
  55. *
  56. * @ORM\Column(type="string")
  57. */
  58. private $email;
  59. /**
  60. * @var string
  61. *
  62. * @ORM\Column(type="string")
  63. */
  64. private $skype;
  65. /**
  66. * @var integer
  67. *
  68. * @ORM\Column(type="integer")
  69. */
  70. private $active_company;
  71. /**
  72. * @var string
  73. *
  74. * @ORM\Column(type="string")
  75. */
  76. private $active_device_id;
  77. /**
  78. * @var \DateTime
  79. *
  80. * @ORM\Column(type="datetime")
  81. */
  82. private $created;
  83. /**
  84. * @var string
  85. *
  86. * @ORM\Column(type="string")
  87. */
  88. private $jobtypes;
  89. /**
  90. * @var \DateTime
  91. *
  92. * @ORM\Column(type="datetime")
  93. */
  94. private $last_seen_mobile;
  95. /**
  96. * @var \DateTime
  97. *
  98. * @ORM\Column(type="datetime")
  99. */
  100. private $last_seen_web;
  101. /**
  102. * @ORM\ManyToOne(targetEntity="Company", inversedBy="assignedCompanies")
  103. */
  104. protected $company;
  105. public function getCompany()
  106. {
  107. return $this->company;
  108. }
  109. public function setCompany($engineer)
  110. {
  111. $company->assignedCompanies($this);
  112. $this->company = $company;
  113. }
  114. public function getJobtypesRel()
  115. {
  116. return $this->jobtypes_rel;
  117. }
  118. public function getId()
  119. {
  120. return $this->id;
  121. }
  122. public function getName(): string
  123. {
  124. return $this->name;
  125. }
  126. public function setName(string $name): self
  127. {
  128. $this->name = $name;
  129. return $this;
  130. }
  131. public function getCmdlevel(): bool
  132. {
  133. return $this->cmdlevel;
  134. }
  135. public function setCmdlevel(bool $cmdlevel): self
  136. {
  137. $this->cmdlevel = $cmdlevel;
  138. return $this;
  139. }
  140. public function getPhone()
  141. {
  142. return $this->phone;
  143. }
  144. public function setPhone(string $phone): self
  145. {
  146. $this->phone = $phone;
  147. return $this;
  148. }
  149. public function getPassword(): string
  150. {
  151. return $this->password;
  152. }
  153. public function setPassword(string $password): self
  154. {
  155. $this->password = $password;
  156. return $this;
  157. }
  158. public function getLogin(): string
  159. {
  160. return $this->login;
  161. }
  162. public function setLogin(string $login): self
  163. {
  164. $this->login = $login;
  165. return $this;
  166. }
  167. public function getEmail()
  168. {
  169. return $this->email;
  170. }
  171. public function setEmail(string $email): self
  172. {
  173. $this->email = $email;
  174. return $this;
  175. }
  176. public function getSkype()
  177. {
  178. return $this->skype;
  179. }
  180. public function setSkype(string $skype): self
  181. {
  182. $this->skype = $skype;
  183. return $this;
  184. }
  185. public function getActiveCompany(): int
  186. {
  187. return $this->active_company;
  188. }
  189. public function setActiveCompany(int $active_company): self
  190. {
  191. $this->active_company = $active_company;
  192. return $this;
  193. }
  194. public function getActiveDeviceId(): string
  195. {
  196. return $this->active_device_id;
  197. }
  198. public function setActiveDeviceId(string $active_device_id): self
  199. {
  200. $this->active_device_id = $active_device_id;
  201. return $this;
  202. }
  203. public function getCreated(): \DateTimeInterface
  204. {
  205. return $this->created;
  206. }
  207. public function setCreated(\DateTimeInterface $created): self
  208. {
  209. $this->created = $created;
  210. return $this;
  211. }
  212. public function getJobtypes(): string
  213. {
  214. return $this->jobtypes;
  215. }
  216. public function setJobtypes(string $jobtypes): self
  217. {
  218. $this->jobtypes = $jobtypes;
  219. return $this;
  220. }
  221. public function getLastSeenMobile(): \DateTimeInterface
  222. {
  223. return $this->last_seen_mobile;
  224. }
  225. public function setLastSeenMobile(\DateTimeInterface $last_seen_mobile): self
  226. {
  227. $this->last_seen_mobile = $last_seen_mobile;
  228. return $this;
  229. }
  230. public function getLastSeenWeb(): \DateTimeInterface
  231. {
  232. return $this->last_seen_web;
  233. }
  234. public function setLastSeenWeb(\DateTimeInterface $last_seen_web): self
  235. {
  236. $this->last_seen_web = $last_seen_web;
  237. return $this;
  238. }
  239. public function addAcoountJobtypes(Jobtype $jobtype)
  240. {
  241. return $this->jobtypes_rel[] = $jobtype;
  242. }
  243. }