<?php
/**
* Created by PhpStorm.
* User: ahawley
* Date: 3/7/2017
* Time: 12:30 PM
*/
namespace Globals\ResourceManagementBundle\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Globals\ClaimManagementBundle\Entity\Assignments;
use Globals\ClaimManagementBundle\Entity\ClaimResourcePrevious;
use Globals\ClaimManagementBundle\Entity\ClaimTeamResource;
use Globals\CustomerManagementBundle\Entity\Customer;
use Globals\CustomerManagementBundle\Entity\CustomerResource;
use Globals\InvoiceManagementBundle\Entity\Invoice;
use Globals\ResourceManagementBundle\Annotation\RegisterProfileObject;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use DoctrineExtensions\Query\Mysql\Week;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="Globals\ResourceManagementBundle\Repository\ResourceRepository")
* @ORM\Table(name="resource")
* @ORM\HasLifecycleCallbacks()
*/
class Resource implements UserInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(name="id", type="integer")
*/
private $id;
/**
* @ORM\Column(name="last_activity_at", type="datetime")
*/
private $lastActivityAt;
/**
* @ORM\Column(name="is_active", type="boolean")
*/
private $isActive = 1;
/**
* @RegisterProfileObject(step="1")
* @ORM\Column(name="username", type="string")
* @Assert\NotBlank(message="This value cannot be empty!", groups={"newuser", "Default"})
*/
private $username;
/**
* @ORM\Column(name="password", type="string")
*/
private $password;
/**
* @ORM\Column(name="email", type="string")
* @Assert\NotBlank(message="This value cannot be empty!", groups={"newuser", "Default"})
* @Assert\Email()
*/
private $email;
/**
* @ORM\Column(name="first_name", type="string")
* @Assert\NotBlank(message="This value cannot be empty!", groups={"newuser", "Default"})
*/
private $firstName;
/**
* @ORM\Column(name="last_name", type="string")
* @Assert\NotBlank(message="This value cannot be empty!", groups={"newuser", "Default"})
*/
private $lastName;
/**
* @ORM\Column(name="middle_name", type="string", nullable=true)
*/
private $middleName;
/**
* @ORM\Column(name="phone", type="string")
*/
private $phone;
/**
* @ORM\Column(name="wing_span_collaborator_id", type="string")
*/
private $wingSpanCollaboratorId;
/**
* @ORM\Column(name="wing_span_collaborator_group_id", type="string")
*/
private $wingSpanCollaboratorGroupId;
/**
* @ORM\Column(name="send_to_fact", type="boolean")
*/
private $sendToFact;
/**
* @ORM\Column(name="fact_adjuster_id", type="string")
*/
private $factAdjusterId;
/**
* @ORM\Column(name="mobile_phone", type="string")
*/
private $mobile_phone;
/**
* @ORM\Column(name="fax", type="string", nullable=true)
*/
private $fax;
/**
* @ORM\Column(name="roles", type="string", nullable=true)
*/
private $roles = '["ROLE_REGISTERED"]';
/**
* @ORM\Column(name="title", type="string", nullable=true)
*/
private $title;
/**
* @ORM\Column(name="designation", type="string", nullable=true)
*/
private $designation;
/**
* @ORM\Column(name="payroll_id", type="string")
*/
private $payrollId = 0;
/**
* @ORM\Column(name="payroll_type", type="integer", nullable=true)
*/
private $payrollType = 1;
/**
* @ORM\Column(name="is_w2", type="boolean")
*/
private $isW2 = 0;
/**
* @ORM\Column(name="is_tlg", type="boolean")
*/
private $isTlg = 0;
/**
* @return int
*/
public function getIsTlg()
{
return $this->isTlg;
}
/**
* @param int $isTlg
*/
public function setIsTlg($isTlg)
{
$this->isTlg = $isTlg;
}
/**
* @ORM\Column(name="is_hourly", type="boolean")
*/
private $isHourly = 0;
/**
* @ORM\ManyToMany(targetEntity="Globals\ResourceManagementBundle\Entity\AdjusterPosition")
*/
private $adjusterPositions;
/**
* @ORM\Column(name="city", type="string")
*/
private $city = "";
/**
* @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\State")
* @ORM\JoinColumn(nullable=false)
*/
private $state;
/**
* @ORM\Column(name="zip", type="string")
*/
private $zip = "";
/**
* @ORM\Column(name="other", type="string", nullable=true)
*/
private $other;
/**
* @ORM\Column(name="address", type="string")
*/
private $address = "";
/**
* @ORM\Column(name="other_phone", type="string", nullable=true)
*/
private $other_phone;
/**
* @ORM\Column(name="notes", type="string", length=5000, nullable=true)
*/
private $notes;
/**
* @ORM\Column(name="ssn_ein", type="string")
*/
private $ssn_ein = 0;
/**
* @ORM\Column(name="signature_text", type="string", nullable=true)
*/
private $signatureText;
/**
* @ORM\Column(name="signature", type="string", nullable=true)
*/
private $signature;
/**
* @ORM\Column(name="allow_mailers", type="integer")
*/
private $allowMailers = 0 ;
/**
* @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\Resource", inversedBy="resources")
* @ORM\JoinColumn(name="supervisor_id", referencedColumnName="id")
*/
private $supervisor;
/**
* @ORM\OneToMany(targetEntity="Globals\ResourceManagementBundle\Entity\Resource", mappedBy="supervisor")
*/
private $resources;
/**
* @ORM\OneToMany(targetEntity="Globals\ResourceManagementBundle\Entity\ResourceNotificationSetting", mappedBy="resource")
*/
private $resourceNotificationSettings;
/**
* @ORM\Column(name="contract_id", type="integer")
*/
private $contractId = 0;
/**
* @ORM\Column(name="background_check", type="datetime", nullable=true)
*/
private $backgroundCheck;
/**
* @ORM\Column(name="adjuster_available", type="boolean")
*/
private $adjusterAvailable = 1;
/**
* @ORM\Column(name="resume_review", type="integer")
*/
private $resumeReview = 0;
/**
* @ORM\ManyToOne(targetEntity="Globals\ResourceManagementBundle\Entity\ResourceType", inversedBy="resources")
* @ORM\JoinColumn(name="resource_type_id", referencedColumnName="id")
*/
private $resourceType = null;
/**
* @ORM\ManyToOne(targetEntity="Globals\CompanyManagementBundle\Entity\DeskRosterPosition", inversedBy="resourceDeskRosterPosition")
* @ORM\JoinColumn(name="desk_roster_position_id", referencedColumnName="id")
*/
private $deskRosterPosition = null;
/**
* @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\Assignments", mappedBy="resource")
*/
private $resourceClaims = 0;
/**
* @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimResourcePrevious", mappedBy="resource")
*/
private $resourcePreviousClaims;
/**
* @ORM\OneToOne(targetEntity="Globals\ResourceManagementBundle\Entity\ResourceDashboard", mappedBy="resource")
*/
private $resourceDashboard;
/**
* @deprecated
* @ORM\OneToMany(targetEntity="Globals\ResourceManagementBundle\Entity\Limits", mappedBy="resource")
*/
/**
* @ORM\OneToMany(targetEntity="Globals\ResourceManagementBundle\Entity\Event", mappedBy="resource")
*/
private $resourceEvents;
/**
* @ORM\OneToMany(targetEntity="Globals\InvoiceManagementBundle\Entity\InvoiceResource", mappedBy="resource")
*/
private $resourceInvoices = 0;
/**
* @ORM\Column(name="xactimate_exp", type="boolean")
*/
private $xactimateExp = 0;
/**
* @ORM\Column(name="xact_analysis_exp", type="boolean")
*/
private $xactAnalysisExp = 0;
/**
* @ORM\Column(name="symbility_exp", type="boolean")
*/
private $symbilityExp = 0;
/**
* @ORM\Column(name="property_exp", type="boolean")
*/
private $propertyExp = 0;
/**
* @ORM\Column(name="homeowner_exp", type="boolean")
*/
// private $homeownerExp = 0;
/**
* @ORM\Column(name="commercial_exp", type="boolean")
*/
// private $commercialExp = 0;
/**
* @ORM\Column(name="casualty_exp", type="boolean")
*/
// private $casualtyExp = 0;
/**
* @ORM\Column(name="structure_type", type="integer")
*/
private $structureType = 0;
/**
* @ORM\Column(name="military_exp", type="boolean")
*/
private $militaryExp = 0;
/**
* @ORM\Column(name="military_branch", type="string")
*/
private $militaryBranch;
/**
* @ORM\Column(name="storm_list", type="text")
*/
private $stormList;
/**
* @ORM\Column(name="company_list", type="text")
*/
private $companyList;
/**
* @ORM\Column(name="software_list", type="text")
*/
private $softwareList;
/**
* @ORM\Column(name="certs_list", type="text")
*/
// private $certsList;
/**
* @ORM\OneToMany(targetEntity="Globals\ClaimManagementBundle\Entity\ClaimTeamResource", mappedBy="resource")
*/
private $claimTeams;
/**
* @ORM\Column(name="password_reset_token", type="string")
*/
private $passwordResetToken;
/**
* @ORM\Column(name="last_template_assigned", type="string")
*/
private $lastTemplateAssigned;
/**********************
* Branch User Fields *
**********************/
/**
* @ORM\OneToMany(targetEntity="Globals\CustomerManagementBundle\Entity\CustomerResource", mappedBy="resource")
*/
protected $customerResources;
/**
* @ORM\Column(name="has_open_letter", type="boolean")
*/
// protected $has_open_letter = 0;
/**
* @ORM\Column(name="has_close_letter", type="boolean")
*/
// protected $has_close_letter = 0;
/**
* @ORM\Column(name="has_reassign_letter", type="boolean")
*/
// protected $has_reassign_letter = 0;
/**
* @ORM\Column(name="invoice_notifications", type="boolean")
*/
// protected $invoice_notifications = 0;
/**
* @ORM\Column(type="float")
*/
private $serviceExpenseRate = 0.00;
/**
* @ORM\Column(type="boolean")
*/
private $zeroCommission = 0;
/**
* @ORM\Column(type="float", name="latitude")
*/
private $latitude = 0;
/**
* @ORM\Column(type="float", name="longitude")
*/
private $longitude = 0;
/**
* @ORM\Column(type="string", name="activation_key")
*/
private $activationKey;
/**
* @ORM\Column(type="string", name="sms_authetication")
*/
private $smsAuthetication;
/**
* @ORM\Column(type="datetime", name="activation_timestamp")
*/
private $activationTimestamp;
/**
* @var ArrayCollection|WeekLimit
*
* @ORM\OneToMany(targetEntity="Globals\AssignmentBundle\Entity\WeekLimit", mappedBy="resource", cascade={"persist", "remove"})
*/
/**
*
* @ORM\Column(name="last_assigned", type="bigint")
*/
private $lastAssigned = 0;
/**
* @ORM\Column(name="nipr_number", type="string", nullable=true, length=50)
*/
private $niprNumber;
/**
* @ORM\Column(name="agent_sync_response", type="string", nullable=true, length=200)
*/
private $agentSyncResponse;
/**
* @ORM\Column(name="nipr_tracking", type="boolean", nullable=true)
*/
private $niprTracking;
/**
* @ORM\Column(name="password_change_date", type="datetime")
*/
private $passwordChangeDate;
/**
* @ORM\Column(name="naca", type="integer", nullable=true)
*/
private $naca = 1;
/**
* @ORM\Column(type="integer", name="sms_accept_message")
*/
private $smsAcceptMessage;
/**
* @ORM\ManyToOne(targetEntity="Globals\CompanyManagementBundle\Entity\Acquisition", inversedBy="resourceAcquisition")
* @ORM\JoinColumn(name="acquisition_id", referencedColumnName="id")
*/
private $acquisition = null;
/**
* Adds a single week limit
* @param WeekLimit $weekLimit
*/
private function addWeekLimit(WeekLimit $weekLimit)
{
if ($this->limits->contains($weekLimit)) {
return;
}
}
/**
* @return void
*/
public function removeCustomerResource()
{
$this->customerResources = null;
}
/**
* @return mixed
*/
public function getCustomerResources()
{
return $this->customerResources;
}
/**
* @param $customerResources
*/
public function setCustomerResources($customerResources)
{
$this->customerResources = $customerResources;
}
/**
* @return boolean
*/
/*public function getHasOpenLetter()
{
return $this->has_open_letter;
}*/
/**
* @param boolean $boolean
*/
/*public function setHasOpenLetter($boolean)
{
$this->has_open_letter = $boolean;
}*/
/**
* @return boolean
*/
/*public function getHasCloseLetter()
{
return $this->has_close_letter;
}*/
/**
* @param boolean $boolean
*/
/*public function setHasCloseLetter($boolean)
{
$this->has_close_letter = $boolean;
}*/
/**
* @return boolean
*/
/*public function getHasReassignLetter()
{
return $this->has_reassign_letter;
}*/
/**
* @param boolean $boolean
*/
/*public function setHasReassignLetter($boolean)
{
$this->has_reassign_letter = $boolean;
}*/
/**
* @return boolean
*/
/*public function getInvoiceNotifications()
{
return $this->invoice_notifications;
}*/
/**
* @param boolean $boolean
*/
/*public function setInvoiceNotifications($boolean)
{
$this->invoice_notifications = $boolean;
}*/
/*************************
* Symbility User Fields *
*************************/
/**
* @ORM\Column(type="string")
* @Assert\Length(min=4)
*/
private $symbility_address;
/**
* @return mixed
*/
public function getSymbilityAddress()
{
return $this->symbility_address;
}
/**
* @param mixed $symbility_address
*/
public function setSymbilityAddress($symbility_address)
{
$this->symbility_address = $symbility_address;
}
/*************************
* Xact User Fields *
*************************/
/**
* @ORM\Column(type="string")
*/
private $xactAddress;
/**
* @ORM\Column(name="updated_at", type="datetime", nullable=true)
*/
private \DateTime $updatedAt;
/**
* @return \DateTime
*/
public function getUpdatedAt(): \DateTime
{
return $this->updatedAt;
}
/**
* @param \DateTime $updatedAt
* @return $this
*/
public function setUpdatedAt(\DateTime $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist
*/
public function prePersist()
{
$this->updatedAt = new \DateTime();
}
/**
* @ORM\PreUpdate()
*/
public function preUpdate()
{
$this->updatedAt = new \DateTime();
}
/**
* @return mixed
*/
public function getXactAddress()
{
return $this->xactAddress;
}
/**
* @param mixed $xactAddress
*/
public function setXactAddress($xactAddress)
{
$this->xactAddress = $xactAddress;
}
public function __toString()
{
return ucfirst($this->getFirstName()) . " " . ucfirst($this->getLastName());
}
/**
* @return ResourceType
*/
public function getResourceType()
{
return $this->resourceType;
}
/**
* @param mixed $resourceType
*/
public function setResourceType($resourceType)
{
// if ($resourceType instanceof Resource) {
$this->resourceType = $resourceType;
// }
}
/**
* @return void
*/
public function removeResourceType()
{
$this->resourceType = null;
}
/**
* @return DeskRosterPosition
*/
public function getDeskRosterPosition()
{
return $this->deskRosterPosition;
}
/**
* @param mixed $deskRosterPosition
*/
public function setDeskRosterPosition($deskRosterPosition)
{
$this->deskRosterPosition = $deskRosterPosition;
}
/**
* @return void
*/
public function removeDeskRosterPosition()
{
$this->deskRosterPosition = null;
}
/**
* @return Acquisition
*/
public function getAcquisition()
{
return $this->acquisition;
}
/**
* @param mixed $acquisition
*/
public function setAcquisition($acquisition)
{
$this->acquisition = $acquisition;
}
/**
* @return void
*/
public function removeAcquisition()
{
$this->acquisition = null;
}
function __construct()
{
$this->resources = new ArrayCollection();
$this->adjusterPositions = new ArrayCollection();
$this->resourceNotificationSettings = new ArrayCollection();
//$this->backgroundCheck = new \DateTime();
$this->resourceClaims = new ArrayCollection();
$this->resourcePreviousClaims = new ArrayCollection();
$this->resourceClaimRules = new ArrayCollection();
// $this->resourceLimits = new ArrayCollection();
$this->resourceInvoices = new ArrayCollection();
$this->claimTeams = new ArrayCollection();
$this->perils = new ArrayCollection();
$this->subPerils = new ArrayCollection();
$this->states = new ArrayCollection();
$this->zipCodes = new ArrayCollection();
$this->skills = new ArrayCollection();
$this->catCodes = new ArrayCollection();
$this->workDays = new ArrayCollection();
$this->reserveZipCodes = new ArrayCollection();
}
// /**
// * @Assert\Callback()
// */
// public function validate(ExecutionContextInterface $context, $payload)
// {
// if (!filter_var($this->getEmail(), FILTER_VALIDATE_EMAIL)) {
// $context->buildViolation('Please enter valid email')
// ->atPath('email')
// ->addViolation();
// }
//
// }
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @param \Datetime $lastActivityAt
*/
public function setLastActivityAt($lastActivityAt)
{
$this->lastActivityAt = $lastActivityAt;
}
/**
* @return \Datetime
*/
public function getLastActivityAt()
{
return $this->lastActivityAt;
}
/**
* @return Bool Whether the user is active or not
*/
public function isActiveNow()
{
// Delay during wich the user will be considered as still active
$delay = new \DateTime('2 minutes ago');
return ( $this->getLastActivityAt() > $delay );
}
/**
* @return int
*/
public function getIsActive()
{
return $this->isActive;
}
/**
* @param mixed $isActive
*/
public function setIsActive($isActive)
{
$this->isActive = $isActive;
}
/**
* @return mixed
*/
public function getUsername()
{
return $this->username;
}
/**
* @param mixed $username
*/
public function setUsername($username)
{
$this->username = $username;
}
/**
* @return mixed
*/
public function getPassword()
{
return $this->password;
}
/**
* @param mixed $password
*/
public function setPassword($password)
{
if (!is_null($password)) {
if (!empty($password)) {
$this->password = $password;
}
}
}
/**
* @return mixed
*/
public function getEmail()
{
return $this->email;
}
/**
* @param mixed $email
*/
public function setEmail($email)
{
$this->email = $email;
}
public function getFullNameNoType()
{
$fullNameNoType = $this->getFullName();
if ($this->getResourceType()) {
$fullNameNoType .= $this->getResourceType()->getResourceType();
}
return $fullNameNoType;
}
public function getFullName()
{
return $this->getFirstName() . " " . $this->getLastName();
}
/**
* @return string
*/
public function getFullNameWithMiddle()
{
if (!empty($this->getMiddleName())) {
return $this->getFirstName() . " " . $this->getMiddleName(). " " . $this->getLastName();
} else {
return $this->getFirstName() . " " . $this->getLastName();
}
}
/**
* @return string
*/
public function getFirstName()
{
return $this->firstName;
}
/**
* @param string $firstName
*/
public function setFirstName($firstName)
{
$this->firstName = $firstName;
}
/**
* @return string
*/
public function getMiddleName()
{
return $this->middleName;
}
/**
* @param string $middleName
*/
public function setMiddleName($middleName)
{
$this->middleName = $middleName;
}
/**
* @return string
*/
public function getLastName()
{
return $this->lastName;
}
/**
* @param string $lastName
*/
public function setLastName($lastName)
{
$this->lastName = $lastName;
}
###
#
# Added to conform to AppBundle\User.php when pulling from security context
#
###
/**
* Get fname
*
* @return string
*/
public function getFname()
{
return $this->firstName;
}
/**
* Get lname
*
* @return string
*/
public function getLname()
{
return $this->lastName;
}
/**
* @return mixed
*/
public function getPhone()
{
return $this->phone;
}
/**
* @param mixed $phone
*/
public function setPhone($phone)
{
$this->phone = $phone;
}
/**
* @return mixed
*/
public function getSendToFact()
{
return $this->sendToFact;
}
/**
* @param mixed $sendToFact
*/
public function sendToFact($sendToFact)
{
$this->sendToFact = $sendToFact;
}
/**
* @return mixed
*/
public function getFactAdjusterId()
{
return $this->factAdjusterId;
}
/**
* @param mixed $factAdjusterId
*/
public function factAdjusterId($factAdjusterId)
{
$this->factAdjusterId = $factAdjusterId;
}
/**
* @return mixed
*/
public function getMobilePhone()
{
return $this->mobile_phone;
}
/**
* @param mixed $mobile_phone
*/
public function setMobilePhone($mobile_phone)
{
$this->mobile_phone = $mobile_phone;
}
/**
* @return mixed
*/
public function getFax()
{
return $this->fax;
}
/**
* @param mixed $fax
*/
public function setFax($fax)
{
$this->fax = $fax;
}
/**
* @param string $string
*/
public function setOther($string)
{
$this->other = $string;
}
/**
* @return string
*/
public function getOther()
{
return $this->other;
}
/**
* Returns the roles or permissions granted to the user for security.
*/
public function getRoles()
{
$roles = json_decode($this->roles);
// guarantees that a user always has at least one role for security
if (empty($roles)) {
$roles = array();
return $roles[] = 'ROLE_USER';
}
return array_unique($roles);
}
/**
* @param mixed $roles
*/
public function setRoles($roles)
{
$this->roles = $roles;
}
public function getDisplayRoles()
{
$displayRoles = $this->roles;
if(is_array($displayRoles)){
foreach($displayRoles as $displayRole){
$displayRoles .= $displayRole.', ';
}
$displayRoles = substr($displayRoles, 0, -2);
}
else
$displayRoles = $this->roles;
return $displayRoles;
}
/**
* Returns the salt that was originally used to encode the password.
*/
public function getSalt()
{
// See "Do you need to use a Salt?" at http://symfony.com/doc/current/cookbook/security/entity_provider.html
// we're using bcrypt in security.yml to encode the password, so
// the salt value is built-in and you don't have to generate one
return;
}
/**
* Removes sensitive data from the user.
*/
public function eraseCredentials()
{
// if you had a plainPassword property, you'd nullify it here
// $this->plainPassword = null;
}
/**
* @return mixed
*/
public function getTitle()
{
return $this->title;
}
/**
* @param mixed $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return mixed
*/
public function getDesignation()
{
return $this->designation;
}
/**
* @param mixed $designation
*/
public function setDesignation($designation)
{
$this->designation = $designation;
}
/**
* @return mixed
*/
public function getPayrollId()
{
return $this->payrollId;
}
/**
* @param mixed $payrollId
*/
public function setPayrollId($payrollId)
{
$this->payrollId = $payrollId;
}
/**
* @return mixed
*/
public function getPayrollType()
{
return $this->payrollType;
}
/**
* @param mixed $payrollType
*/
public function setPayrollType($payrollType)
{
$this->payrollType = $payrollType;
}
/**
* @return mixed
*/
public function getIsW2()
{
return $this->isW2;
}
/**
* @param mixed $isW2
*/
public function setIsW2($isW2)
{
$this->isW2 = $isW2;
}
/**
* @return integer
*/
public function getIsHourly()
{
return $this->isHourly;
}
/**
* @param integer $isHourly
*/
public function setIsHourly($isHourly)
{
$this->isHourly = $isHourly;
}
/**
* @return mixed
*/
public function getAdjusterPositions()
{
return $this->adjusterPositions;
}
/**
* @param mixed $adjusterPositions
*/
public function setAdjusterPositions(AdjusterPosition $adjusterPositions)
{
$this->adjusterPositions = $adjusterPositions;
}
/**
* @return mixed
*/
public function getCity()
{
return $this->city;
}
/**
* @param mixed $city
*/
public function setCity($city)
{
$this->city = $city;
}
/**
* @return State
*/
public function getState()
{
return $this->state;
}
/**
* @param State $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return mixed
*/
public function getZip()
{
return $this->zip;
}
/**
* @param mixed $zip
*/
public function setZip($zip)
{
$this->zip = $zip;
}
/**
* @return mixed
*/
public function getAddress()
{
return $this->address;
}
/**
* @param mixed $address
*/
public function setAddress($address)
{
$this->address = $address;
}
/**
* @return mixed
*/
public function getOtherPhone()
{
return $this->other_phone;
}
/**
* @param mixed $other_phone
*/
public function setOtherPhone($other_phone)
{
$this->other_phone = $other_phone;
}
/**
* @return mixed
*/
public function getNotes()
{
return $this->notes;
}
/**
* @param mixed $notes
*/
public function setNotes($notes)
{
$this->notes = $notes;
}
/**
* @return mixed
*/
public function getSsnEin()
{
return $this->ssn_ein;
}
/**
* @param mixed $ssn_ein
*/
public function setSsnEin($ssn_ein)
{
$this->ssn_ein = $ssn_ein;
}
/**
* @return mixed
*/
public function getSignatureText()
{
return $this->signatureText;
}
/**
* @param mixed $signatureText
*/
public function setSignatureText($signatureText)
{
$this->signatureText = $signatureText;
}
/**
* @return mixed
*/
public function getSignature()
{
return $this->signature;
}
/**
* @param mixed $signature
*/
public function setSignature($signature)
{
$this->signature = $signature;
}
/**
* @return mixed
*/
public function getAllowMailers()
{
return $this->allowMailers;
}
/**
* @param mixed $allowMailers
*/
public function setAllowMailers($allowMailers)
{
$this->allowMailers = $allowMailers;
}
/**
* @return Resource
*/
public function getSupervisor()
{
return $this->supervisor;
}
/**
* @param Resource $supervisor
*/
public function setSupervisor(Resource $supervisor=null)
{
$this->supervisor = $supervisor;
}
/**
* @return mixed
*/
public function getResources()
{
return $this->resources;
}
/**
* @return mixed
*/
public function getContractId()
{
return $this->contractId;
}
/**
* @param mixed $contractId
*/
public function setContractId($contractId)
{
$this->contractId = $contractId;
}
/**
* @return mixed
*/
public function getBackgroundCheck()
{
return $this->backgroundCheck;
}
/**
* @param mixed $backgroundCheck
*/
public function setBackgroundCheck($backgroundCheck)
{
$this->backgroundCheck = $backgroundCheck;
}
/**
* @return mixed
*/
public function getAdjusterAvailable()
{
return $this->adjusterAvailable;
}
/**
* @param mixed $adjusterAvailable
*/
public function setAdjusterAvailable($adjusterAvailable)
{
$this->adjusterAvailable = $adjusterAvailable;
}
/**
* @return mixed
*/
public function getResumeReview()
{
return $this->resumeReview;
}
/**
* @param mixed $resumeReview
*/
public function setResumeReview($resumeReview)
{
$this->resumeReview = $resumeReview;
}
/**
* @param ResourceNotificationSetting $resourceNotificationSetting
*/
public function addResourceNotificationSetting(ResourceNotificationSetting $resourceNotificationSetting)
{
if( $this->$resourceNotificationSetting->contains($resourceNotificationSetting) ){
return;
}
$this->$resourceNotificationSetting->add( $resourceNotificationSetting );
$resourceNotificationSetting->setResource( $this );
}
/**
* @param ResourceNotificationSetting $resourceNotificationSetting
*/
public function removeResourceNotificationSetting( ResourceNotificationSetting $resourceNotificationSetting )
{
if( !$this->resourceNotificationSettings->contains($resourceNotificationSetting) ){
return;
}
$this->resourceNotificationSettings->removeElement( $resourceNotificationSetting );
$resourceNotificationSetting->removeResource();
}
/**
* @return array
*/
public function getResourceNotificationSettings()
{
return $this->resourceNotificationSettings->toArray();
}
/**
* @param Assignments $claimResource
*/
public function addResourceClaim( Assignments $claimResource )
{
if( $this->resourceClaims->contains($claimResource) ){
return;
}
$this->resourceClaims->add( $claimResource );
$claimResource->setResource($this);
}
/**
* @param Assignments $claimResource
*/
public function removeResourceClaim( Assignments $claimResource )
{
if( !$this->resourceClaims->contains($claimResource) ){
return;
}
$this->resourceClaims->removeElement( $claimResource );
$claimResource->removeResource($this);
}
/**
* @return array
*/
public function getResourceClaims()
{
return $this->resourceClaims->toArray();
}
/**
* @param ClaimResourcePrevious $resourcePreviousClaims
*/
public function addResourcePreviousClaim( ClaimResourcePrevious $resourcePreviousClaims )
{
if( $this->resourcePreviousClaims->contains($resourcePreviousClaims) ){
return;
}
$this->resourcePreviousClaims->add( $resourcePreviousClaims );
$resourcePreviousClaims->setResource($this);
}
/**
* @param ClaimResourcePrevious $resourcePreviousClaims
*/
public function removeResourcePreviousClaim( ClaimResourcePrevious $resourcePreviousClaims )
{
if( !$this->resourcePreviousClaims->contains($resourcePreviousClaims) ){
return;
}
$this->resourcePreviousClaims->removeElement( $resourcePreviousClaims );
$resourcePreviousClaims->removeResource($this);
}
/**
* @return array
*/
public function getResourcePreviousClaims()
{
return $this->resourcePreviousClaims->toArray();
}
/**
* @param ResourceDashboard $resourceDashboard
*/
public function setResourceDashboard( ResourceDashboard $resourceDashboard )
{
$this->resourceDashboard = $resourceDashboard;
}
/**
* @return void
*/
public function removeResourceDashboard()
{
$this->resourceDashboard= null;
}
/**
* @return string
*/
public function getResourceDashboard()
{
return $this->resourceDashboard;
}
/**
* @param Event $event
*/
public function addResourceEvent( Event $event )
{
if( $this->resourceEvents->contains($event) ){
return;
}
$this->resourceEvents->add( $event );
$event->setResource($this);
}
/**
* @param Event $event
*/
public function removeResourceEvent( Event $event )
{
if( !$this->resourceEvents->contains($event) ){
return;
}
$this->resourceEvents->removeElement( $event );
$event->removeResource($this);
}
/**
* @return array
*/
public function getResourceEvents()
{
return $this->resourceEvents->toArray();
}
/**
* @param Invoice $resourceInvoice
*/
public function addResourceInvoice( Invoice $resourceInvoice )
{
if( $this->resourceInvoices->contains($resourceInvoice) ){
return;
}
$this->resourceInvoices->add( $resourceInvoice );
$resourceInvoice->setResource($this);
}
/**
* @param Invoice $claimInvoice
*/
public function removeResourceInvoice( Invoice $resourceInvoice )
{
if( !$this->resourceInvoices->contains($resourceInvoice) ){
return;
}
$this->resourceInvoices->removeElement( $resourceInvoice );
$resourceInvoice->removeResource($this);
}
/**
* @return array
*/
public function getResourceInvoices()
{
return $this->resourceInvoices->toArray();
}
/**
* @return mixed
*/
public function getServiceExpenseRate()
{
return $this->serviceExpenseRate;
}
/**
* @param mixed $serviceExpenseRate
*/
public function setServiceExpenseRate($serviceExpenseRate)
{
$this->serviceExpenseRate = $serviceExpenseRate;
}
/**
* @return mixed
*/
public function getZeroCommission()
{
return $this->zeroCommission;
}
/**
* @param mixed $zeroCommission
*/
public function setZeroCommission($zeroCommission)
{
$this->zeroCommission = $zeroCommission;
}
/**
* @return boolean
*/
public function getXactimateExp()
{
return $this->xactimateExp;
}
/**
* @param boolean $boolean
*/
public function setXactimateExp($boolean)
{
$this->xactimateExp = $boolean;
}
/**
* @return boolean
*/
public function getXactAnalysisExp()
{
return $this->xactAnalysisExp;
}
/**
* @param boolean $boolean
*/
public function setXactAnalysisExp($boolean)
{
$this->xactAnalysisExp = $boolean;
}
/**
* @return boolean
*/
public function getSymbilityExp()
{
return $this->symbilityExp;
}
/**
* @param boolean $boolean
*/
public function setSymbilityExp($boolean)
{
$this->symbilityExp = $boolean;
}
/**
* @return boolean
*/
public function getPropertyExp()
{
return $this->propertyExp;
}
/**
* @param boolean $boolean
*/
public function setPropertyExp($boolean)
{
$this->propertyExp = $boolean;
}
/**
* @return boolean
*/
/*public function getHomeownerExp()
{
return $this->homeownerExp;
}*/
/**
* @param boolean $boolean
*/
/*public function setHomeownerExp($boolean)
{
$this->homeownerExp = $boolean;
}*/
/**
* @return boolean
*/
/*public function getCommercialExp()
{
return $this->commercialExp;
}*/
/**
* @param boolean $boolean
*/
/*public function setCommercialExp($boolean)
{
$this->commercialExp = $boolean;
}*/
/**
* @return boolean
*/
/*public function getCasualtyExp()
{
return $this->casualtyExp;
}*/
/**
* @param boolean $boolean
*/
/*public function setCasualtyExp($boolean)
{
$this->casualtyExp = $boolean;
}*/
/**
* @return integer
*/
public function getStructureType()
{
return $this->structureType;
}
/**
* @param integer $integer
*/
public function setStructureType($integer)
{
$this->structureType = $integer;
}
/**
* @return boolean
*/
public function getMilitaryExp()
{
return $this->militaryExp;
}
/**
* @param boolean $boolean
*/
public function setMilitaryExp($boolean)
{
$this->militaryExp = $boolean;
}
/**
* @return string
*/
public function getMilitaryBranch()
{
return $this->militaryBranch;
}
/**
* @param string $string
*/
public function setMilitaryBranch($string)
{
$this->militaryBranch = $string;
}
/**
* @return string
*/
public function getStormList()
{
return $this->stormList;
}
/**
* @param string $string
*/
public function setStormList($string)
{
$this->stormList = $string;
}
/**
* @return string
*/
public function getCompanyList()
{
return $this->companyList;
}
/**
* @param string $string
*/
public function setCompanyList($string)
{
$this->companyList = $string;
}
/**
* @return string
*/
public function getSoftwareList()
{
return $this->softwareList;
}
/**
* @param string $string
*/
public function setSoftwareList($string)
{
$this->softwareList = $string;
}
/**
* @return string
*/
/*public function getCertsList()
{
return $this->certsList;
}*/
/**
* @param string $string
*/
/*public function setCertsList($string)
{
$this->certsList = $string;
}*/
/**
* @param ClaimTeamResource $claimTeam
*/
public function addClaimTeam( ClaimTeamResource $claimTeam )
{
if( $this->claimTeams->contains($claimTeam) ){
return;
}
$this->claimTeams->add( $claimTeam );
$claimTeam->setResource($this);
}
/**
* @param ClaimTeamResource $claimTeam
*/
public function removeClaimTeam( ClaimTeamResource $claimTeam )
{
if( !$this->claimTeams->contains($claimTeam) ){
return;
}
$this->claimTeams->removeElement( $claimTeam );
$claimTeam->removeResource();
}
/**
* @return array
*/
public function getClaimTeams($toArray=true)
{
if ($toArray) {
return $this->claimTeams->toArray();
} else {
return $this->claimTeams;
}
}
/**
* @return mixed
*/
public function getLatitude()
{
return $this->latitude;
}
/**
* @param mixed $latitude
*/
public function setLatitude($latitude)
{
$this->latitude = $latitude;
}
/**
* @return mixed
*/
public function getLongitude()
{
return $this->longitude;
}
/**
* @param mixed $longitude
*/
public function setLongitude($longitude)
{
$this->longitude = $longitude;
}
/**
* @return string
*/
public function getActivationKey()
{
return $this->activationKey;
}
/**
* @param string $activationKey
*/
public function setActivationKey($activationKey)
{
$this->activationKey = $activationKey;
}
/**
* @return \DateTime
*/
public function getActivationTimestamp()
{
return $this->activationTimestamp;
}
/**
* @param \DateTime $activationTimestamp
*/
public function setActivationTimestamp($activationTimestamp)
{
$this->activationTimestamp = $activationTimestamp;
}
/**
* Set PasswordResetToken
*
* @return string
*
*/
public function setPasswordResetToken($passwordResetToken)
{
$this->passwordResetToken = $passwordResetToken;
return $this;
}
/**
* Get PasswordResetToken
*
* @return string
*/
public function getPasswordResetToken()
{
return $this->passwordResetToken;
}
/**
* @return array
*/
public function getWeekLimits()
{
return $this->limits->toArray();
}
/**
* @return integer
*/
public function getLastAssigned()
{
return $this->lastAssigned;
}
/**
* @param integer $lastAssigned
*/
public function setLastAssigned($lastAssigned)
{
$this->lastAssigned = $lastAssigned;
}
/**
* @return mixed
*/
public function getLastTemplateAssigned()
{
return $this->lastTemplateAssigned;
}
/**
* @param mixed $lastTemplateAssigned
*/
public function setLastTemplateAssigned($lastTemplateAssigned)
{
$this->lastTemplateAssigned = $lastTemplateAssigned;
}
/**
* @return mixed
*/
public function getNiprNumber(){
return trim($this->niprNumber);
}
/**
* @param mixed $niprNumber
*/
public function setNiprNumber($niprNumber){
$this->niprNumber = trim($niprNumber);
}
/**
* @return mixed
*/
public function getAgentSyncResponse(){
return trim($this->agentSyncResponse);
}
/**
* @param mixed $agentSyncResponse
*/
public function setAgentSyncResponse($agentSyncResponse){
$this->agentSyncResponse = trim($agentSyncResponse);
}
/**
* @return mixed
*/
public function getWingSpanCollaboratorId(){
return trim($this->wingSpanCollaboratorId);
}
/**
* @param mixed $agentSyncResponse
*/
public function setWingSpanCollaboratorId($wingSpanCollaboratorId){
$this->wingSpanCollaboratorId = trim($wingSpanCollaboratorId);
}
/**
* @return mixed
*/
public function getWingSpanCollaboratorGroupId(){
return trim($this->wingSpanCollaboratorGroupId);
}
/**
* @param mixed $agentSyncResponse
*/
public function setWingSpanCollaboratorGroupId($wingSpanCollaboratorGroupId){
$this->wingSpanCollaboratorGroupId = trim($wingSpanCollaboratorGroupId);
}
/**
* @return mixed
*/
public function getNiprTracking(){
return $this->niprTracking;
}
/**
* @param mixed $niprTracking
*/
public function setNiprTracking($niprTracking){
$this->niprTracking = $niprTracking;
}
/**
* Set SmsAuthetication
*
* @return string
*
*/
public function setSmsAuthetication($smsAuthetication)
{
$this->smsAuthetication = $smsAuthetication;
return $this;
}
/**
* Get SmsAuthetication
*
* @return string
*/
public function getSmsAuthetication()
{
return $this->smsAuthetication;
}
/**
* @param \Datetime $passwordChangeDate
*/
public function setPasswordChangeDate($passwordChangeDate)
{
$this->passwordChangeDate = $passwordChangeDate;
}
/**
* @return \Datetime
*/
public function getPasswordChangeDate()
{
return $this->passwordChangeDate;
}
/**
* @return integer
*/
public function getNaca()
{
return $this->naca;
}
/**
* @param integer $naca
*/
public function setNaca($naca)
{
$this->naca = $naca;
}
/**
* Set smsAcceptMessage
*
* @return integer
*
*/
public function setSmsAcceptMessage($smsAcceptMessage)
{
$this->smsAcceptMessage = $smsAcceptMessage;
return $this;
}
/**
* Get smsAcceptMessage
*
* @return integer
*/
public function getSmsAcceptMessage()
{
return $this->smsAcceptMessage;
}
}