<?php
namespace App\Entity;
use App\Entity\Common\SoftDeletableEntityTrait;
use App\Entity\Common\StatefulEntityTrait;
use App\Entity\Common\TimestampedEntityTrait;
use Doctrine\ORM\Mapping\UniqueConstraint;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Evence\Bundle\SoftDeleteableExtensionBundle\Mapping\Annotation as Evence;
/**
* Class CompanyUser
*
* @ORM\Entity(repositoryClass="App\Repository\CompanyUserRepository")
* @ORM\Table(indexes={
* @ORM\Index(name="IDX_updated_at", columns={"updated_at"}),
* @ORM\Index(name="IDX_deleted_at", columns={"deleted_at"}),
* @ORM\Index(name="IDX_is_active", columns={"is_active"}),
* @ORM\Index(name="IDX_email", columns={"email"})
* }
* ,uniqueConstraints={
* @UniqueConstraint(name="UNIQ_email", columns={"email"}),
* })
* @Gedmo\SoftDeleteable(fieldName="deletedAt")
*/
class CompanyUser
{
use SoftDeletableEntityTrait, StatefulEntityTrait, TimestampedEntityTrait;
/**
* @var integer
*
* @ORM\Id()
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var string
*
* @ORM\Column(length=100)
*/
private $email;
/**
* @ORM\ManyToOne(targetEntity="Company")
* @ORM\JoinColumn(name="company_id", referencedColumnName="id", onDelete="CASCADE")
*/
private $company;
/**
* @ORM\ManyToOne(targetEntity="StaUserType")
* @ORM\JoinColumn(name="user_type", referencedColumnName="code", onDelete="CASCADE")
*/
private $usertype;
/**
* @var string
*
* @ORM\Column(length=50)
*/
private $password;
/**
* @var string
*
* @ORM\Column(length=100)
*/
private $firstName;
/**
* @var string
*
* @ORM\Column(length=100)
*/
private $lastName;
/**
* @var string|null
*
* @ORM\Column(type="string", length=1, nullable=true)
*/
private $gender;
/**
* @var DateTime|null
*
* @ORM\Column(type="date", nullable=true)
*/
private $birthDate;
/**
* @var string|null
*
* @ORM\Column(length=50, nullable=true)
*/
private $cellPhone;
/**
* @var string|null
*
* @ORM\Column(length=100, nullable=true)
*/
private $jobTitle;
/**
* @var string|null
*
* @ORM\Column(length=50, nullable=true)
*/
private $businessPhone;
/**
* @var string|null
*
* @ORM\Column(length=10, nullable=true)
*/
private $businessPhoneExtension;
/**
* @var bool
*
* @ORM\Column(type="boolean")
*/
private $isAdmin = 0;
/**
* @var string|null
*
* @ORM\Column(length=250, nullable=true)
*/
private $deviceUniqueId;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
*/
public function setId(int $id): void
{
$this->id = $id;
}
/**
* @return string
*/
public function getUsername(): string
{
return $this->username;
}
/**
* @param string $username
*/
public function setUsername(string $username): void
{
$this->username = $username;
}
/**
* @return mixed
*/
public function getCompany()
{
return $this->company;
}
/**
* @param mixed $company
*/
public function setCompany($company): void
{
$this->company = $company;
}
/**
* @return mixed
*/
public function getUsertype()
{
return $this->usertype;
}
/**
* @param mixed $usertype
*/
public function setUsertype($usertype): void
{
$this->usertype = $usertype;
}
/**
* @return string
*/
public function getPassword(): string
{
return $this->password;
}
/**
* @param string $password
*/
public function setPassword(string $password): void
{
$this->password = $password;
}
/**
* @return string
*/
public function getFirstName(): string
{
return $this->firstName;
}
/**
* @param string $firstName
*/
public function setFirstName(string $firstName): void
{
$this->firstName = $firstName;
}
/**
* @return string
*/
public function getLastName(): string
{
return $this->lastName;
}
/**
* @param string $lastName
*/
public function setLastName(string $lastName): void
{
$this->lastName = $lastName;
}
/**
* @return string
*/
public function getEmail(): string
{
return $this->email;
}
/**
* @param string $email
*/
public function setEmail(string $email): void
{
$this->email = $email;
}
/**
* @return string|null
*/
public function getGender(): ?string
{
return $this->gender;
}
/**
* @param string|null $gender
*/
public function setGender(?string $gender): void
{
$this->gender = $gender;
}
/**
* @return DateTime|null
*/
public function getBirthDate(): ?DateTime
{
return $this->birthDate;
}
/**
* @param DateTime|null $birthDate
*/
public function setBirthDate(?DateTime $birthDate): void
{
$this->birthDate = $birthDate;
}
/**
* @return string|null
*/
public function getCellPhone(): ?string
{
return $this->cellPhone;
}
/**
* @param string|null $cellPhone
*/
public function setCellPhone(?string $cellPhone): void
{
$this->cellPhone = $cellPhone;
}
/**
* @return string|null
*/
public function getJobTitle(): ?string
{
return $this->jobTitle;
}
/**
* @param string|null $jobTitle
*/
public function setJobTitle(?string $jobTitle): void
{
$this->jobTitle = $jobTitle;
}
/**
* @return string|null
*/
public function getBusinessPhone(): ?string
{
return $this->businessPhone;
}
/**
* @param string|null $businessPhone
*/
public function setBusinessPhone(?string $businessPhone): void
{
$this->businessPhone = $businessPhone;
}
/**
* @return string|null
*/
public function getBusinessPhoneExtension(): ?string
{
return $this->businessPhoneExtension;
}
/**
* @param string|null $businessPhoneExtension
*/
public function setBusinessPhoneExtension(?string $businessPhoneExtension): void
{
$this->businessPhoneExtension = $businessPhoneExtension;
}
/**
* @return bool|int
*/
public function getIsAdmin(): bool
{
return $this->isAdmin;
}
/**
* @param bool|int $isAdmin
*/
public function setIsAdmin(bool $isAdmin): void
{
$this->isAdmin = $isAdmin;
}
/**
* @return string|null
*/
public function getDeviceUniqueId(): ?string
{
return $this->deviceUniqueId;
}
/**
* @param string|null $deviceUniqueId
*/
public function setDeviceUniqueId(?string $deviceUniqueId): void
{
$this->deviceUniqueId = $deviceUniqueId;
}
}