123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- <?php
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
-
- /**
- * @ORM\Entity @ORM\Table(name="accounts")
- */
- class Account extends BaseDBO
- {
- /**
- * Many Jobtypes have Many Accounts.
- * @ORM\ManyToMany(targetEntity="Jobtype",inversedBy="Account")
- * @ORM\JoinTable(name="accounts_jobtypes",)
- */
-
- private $jobtypes_rel;
-
- public function __construct() {
- $this->jobtypes_rel = new ArrayCollection();
- }
- /**
- * @ORM\Id @ORM\Column(type="integer") @ORM\GeneratedValue
- */
- private $id;
- /**
- * @var string
- *
- * @ORM\Column(type="string")
- */
- private $name;
- /**
- * @var boolean
- *
- * @ORM\Column(type="boolean")
- */
- private $cmdlevel;
- /**
- * @var string
- *
- * @ORM\Column(type="string")
- */
- private $phone;
- /**
- * @var string
- *
- * @ORM\Column(type="string")
- */
- private $password;
- /**
- * @var string
- *
- * @ORM\Column(type="string")
- */
- private $login;
- /**
- * @var string
- *
- * @ORM\Column(type="string")
- */
- private $email;
- /**
- * @var string
- *
- * @ORM\Column(type="string")
- */
- private $skype;
- /**
- * @var integer
- *
- * @ORM\Column(type="integer")
- */
- private $active_company;
- /**
- * @var string
- *
- * @ORM\Column(type="string")
- */
- private $active_device_id;
- /**
- * @var \DateTime
- *
- * @ORM\Column(type="datetime")
- */
- private $created;
- /**
- * @var string
- *
- * @ORM\Column(type="string")
- */
- private $jobtypes;
- /**
- * @var \DateTime
- *
- * @ORM\Column(type="datetime")
- */
- private $last_seen_mobile;
- /**
- * @var \DateTime
- *
- * @ORM\Column(type="datetime")
- */
- private $last_seen_web;
-
- /**
- * @ORM\ManyToOne(targetEntity="Company", inversedBy="assignedCompanies")
- */
- protected $company;
-
-
- public function getCompany()
- {
- return $this->company;
- }
-
- public function setCompany($engineer)
- {
- $company->assignedCompanies($this);
- $this->company = $company;
- }
-
- public function getJobtypesRel()
- {
- return $this->jobtypes_rel;
- }
-
- public function getId()
- {
- return $this->id;
- }
- public function getName(): string
- {
- return $this->name;
- }
- public function setName(string $name): self
- {
- $this->name = $name;
- return $this;
- }
- public function getCmdlevel(): bool
- {
- return $this->cmdlevel;
- }
- public function setCmdlevel(bool $cmdlevel): self
- {
- $this->cmdlevel = $cmdlevel;
- return $this;
- }
- public function getPhone()
- {
- return $this->phone;
- }
- public function setPhone(string $phone): self
- {
- $this->phone = $phone;
- return $this;
- }
- public function getPassword(): string
- {
- return $this->password;
- }
- public function setPassword(string $password): self
- {
- $this->password = $password;
- return $this;
- }
- public function getLogin(): string
- {
- return $this->login;
- }
- public function setLogin(string $login): self
- {
- $this->login = $login;
- return $this;
- }
- public function getEmail()
- {
- return $this->email;
- }
- public function setEmail(string $email): self
- {
- $this->email = $email;
- return $this;
- }
- public function getSkype()
- {
- return $this->skype;
- }
- public function setSkype(string $skype): self
- {
- $this->skype = $skype;
- return $this;
- }
- public function getActiveCompany(): int
- {
- return $this->active_company;
- }
- public function setActiveCompany(int $active_company): self
- {
- $this->active_company = $active_company;
- return $this;
- }
- public function getActiveDeviceId(): string
- {
- return $this->active_device_id;
- }
- public function setActiveDeviceId(string $active_device_id): self
- {
- $this->active_device_id = $active_device_id;
- return $this;
- }
- public function getCreated(): \DateTimeInterface
- {
- return $this->created;
- }
- public function setCreated(\DateTimeInterface $created): self
- {
- $this->created = $created;
- return $this;
- }
- public function getJobtypes(): string
- {
- return $this->jobtypes;
- }
- public function setJobtypes(string $jobtypes): self
- {
- $this->jobtypes = $jobtypes;
- return $this;
- }
- public function getLastSeenMobile(): \DateTimeInterface
- {
- return $this->last_seen_mobile;
- }
- public function setLastSeenMobile(\DateTimeInterface $last_seen_mobile): self
- {
- $this->last_seen_mobile = $last_seen_mobile;
- return $this;
- }
- public function getLastSeenWeb(): \DateTimeInterface
- {
- return $this->last_seen_web;
- }
- public function setLastSeenWeb(\DateTimeInterface $last_seen_web): self
- {
- $this->last_seen_web = $last_seen_web;
- return $this;
- }
-
- public function addAcoountJobtypes(Jobtype $jobtype)
- {
- return $this->jobtypes_rel[] = $jobtype;
- }
- }
|