level = CompanyRoles::GUEST; $this->created = new \DateTime(); $this->updated = new \DateTime(); } /** * @param CustomUserInterface $user * @param CustomCompanyInterface $company * @param CustomCompanyServiceInterface|null $service * @param null|string $positionService */ public function setDefault(CustomUserInterface $user, CustomCompanyInterface $company, CustomCompanyServiceInterface $service = null, ?string $positionService = null) { // TODO: Implement setDefault() method. $this->user = $user; $this->company = $company; $this->service = $service; $this->positionInService = $positionService; } /** * @ORM\PrePersist * @ORM\PreUpdate */ public function updateSelf(){ $this->updated = new \DateTime(); } /** * @return int|mixed */ public function getId() { return $this->id; } /** * @return int */ public function getLevel(): int { return $this->level; } /** * @param int $level * @return $this */ public function setLevel(int $level) { $this->level = $level; return $this; } /** * @param bool $owner * @return $this */ public function setOwner(bool $owner) { $this->owner = $owner; return $this; } /** * @return bool */ public function isOwner(): bool { return $this->owner; } /** * @param CustomUserInterface $user * @return $this */ public function setUser(CustomUserInterface $user) { $this->user = $user; return $this; } /** * @return CustomUserInterface */ public function getUser(): CustomUserInterface { return $this->user; } /** * @return CustomCompanyInterface */ public function getCompany(): CustomCompanyInterface { return $this->company; } /** * @param CustomCompanyInterface $company * @return $this */ public function setCompany(CustomCompanyInterface $company) { $this->company = $company; return $this; } /** * @param CustomCompanyServiceInterface|null $service * @return $this */ public function setService(?CustomCompanyServiceInterface $service) { $this->service = $service; return $this; } /** * @return CustomCompanyServiceInterface|null */ public function getService(): ?CustomCompanyServiceInterface { return $this->service; } /** * @param null|string $positionInService * @return $this */ public function setPositionInService(?string $positionInService) { $this->positionInService = $positionInService; return $this; } /** * @return null|string */ public function getPositionInService(): ?string { return $this->positionInService; } /** * @param bool $selfCompany * @return $this */ public function setSelfCompany(bool $selfCompany) { $this->selfCompany = $selfCompany; return $this; } /** * @return bool */ public function isSelfCompany(): bool { return $this->selfCompany; } /** * @param bool $selected * @return $this */ public function setSelected(bool $selected) { $this->selected = $selected; return $this; } /** * @return bool */ public function isSelected(): bool { return $this->selected; } }