<?php
namespace App\Entity\Legacy;
use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\BooleanFilter;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Roothirsch\CoreBundle\Entity\User;
/**
* @ORM\Entity
* @ORM\Table(name="legacy_estimate_address")
* @ApiResource
* @ApiFilter(BooleanFilter::class, properties={"isHidden"})
*/
class EstimateAddress
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var Estimate
* @ORM\ManyToOne(targetEntity="Estimate", cascade={"persist"})
* @ORM\JoinColumn(onDelete="SET NULL")
*/
private $estimate;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*/
private $itemShortcode;
/**
* @var User
* @ORM\ManyToOne(targetEntity="\Roothirsch\CoreBundle\Entity\User", cascade={"persist"})
* @ORM\JoinColumn(onDelete="SET NULL")
*/
private $owner;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $customer;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $address;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $contactPerson;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*/
private $source;
/**
* @ORM\Column(type="boolean")
*/
private $isHidden = false;
/**
* @var DateTime
*
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="integer")
*/
private $created;
/**
* @var DateTime
*
* @Gedmo\Timestampable(on="update")
* @ORM\Column(type="integer")
*/
private $updated;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*
* @return EstimateAddress
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* @return Estimate
*/
public function getEstimate()
{
return $this->estimate;
}
/**
* @param Estimate $estimate
*
* @return EstimateAddress
*/
public function setEstimate($estimate)
{
$this->estimate = $estimate;
return $this;
}
/**
* @return string
*/
public function getItemShortcode()
{
return $this->itemShortcode;
}
/**
* @param string $itemShortcode
*
* @return EstimateAddress
*/
public function setItemShortcode($itemShortcode)
{
$this->itemShortcode = $itemShortcode;
return $this;
}
/**
* @return User
*/
public function getOwner()
{
return $this->owner;
}
/**
* @param User $owner
*
* @return EstimateAddress
*/
public function setOwner($owner)
{
$this->owner = $owner;
return $this;
}
/**
* @return mixed
*/
public function getCustomer()
{
return $this->customer;
}
/**
* @param mixed $customer
*
* @return EstimateAddress
*/
public function setCustomer($customer)
{
$this->customer = $customer;
return $this;
}
/**
* @return mixed
*/
public function getAddress()
{
return $this->address;
}
/**
* @param mixed $address
*
* @return EstimateAddress
*/
public function setAddress($address)
{
$this->address = $address;
return $this;
}
/**
* @return mixed
*/
public function getContactPerson()
{
return $this->contactPerson;
}
/**
* @param mixed $contactPerson
*
* @return EstimateAddress
*/
public function setContactPerson($contactPerson)
{
$this->contactPerson = $contactPerson;
return $this;
}
/**
* @return string
*/
public function getSource()
{
return $this->source;
}
/**
* @param string $source
*
* @return EstimateAddress
*/
public function setSource($source)
{
$this->source = $source;
return $this;
}
/**
* @return bool
*/
public function isHidden()
{
return $this->isHidden;
}
/**
* @param bool $isHidden
*
* @return EstimateAddress
*/
public function setIsHidden($isHidden)
{
$this->isHidden = $isHidden;
return $this;
}
/**
* @return DateTime
*/
public function getCreated()
{
return $this->created;
}
/**
* @return DateTime
*/
public function getUpdated()
{
return $this->updated;
}
}