2018-02-14 15:08:03 -05:00
|
|
|
<?php declare(strict_types=1);
|
2017-11-30 15:06:13 -05:00
|
|
|
|
|
|
|
namespace CameraBundle\Entity;
|
|
|
|
|
2018-02-14 15:08:03 -05:00
|
|
|
/**
|
|
|
|
* Trait CameraTrait
|
|
|
|
*
|
|
|
|
* Shared columns for camera, and previously_owned_camera tables
|
|
|
|
*
|
|
|
|
* @package CameraBundle\Entity
|
|
|
|
*/
|
2017-11-30 15:06:13 -05:00
|
|
|
trait CameraTrait
|
|
|
|
{
|
|
|
|
use PurchasePriceTrait;
|
|
|
|
|
|
|
|
/**
|
2018-02-14 15:08:03 -05:00
|
|
|
* @var CameraType
|
2017-11-30 15:06:13 -05:00
|
|
|
*
|
|
|
|
* @ORM\ManyToOne(targetEntity="CameraType")
|
|
|
|
* @ORM\JoinColumns({
|
|
|
|
* @ORM\JoinColumn(name="type_id", referencedColumnName="id")
|
|
|
|
* })
|
|
|
|
*/
|
|
|
|
private $type;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="brand", type="string", length=64, nullable=false)
|
|
|
|
*/
|
|
|
|
private $brand;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="mount", type="string", length=32, nullable=false)
|
|
|
|
*/
|
|
|
|
private $mount;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="model", type="string", length=255, nullable=false)
|
|
|
|
*/
|
|
|
|
private $model;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var boolean
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="is_digital", type="boolean", nullable=false)
|
|
|
|
*/
|
|
|
|
private $isDigital;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="crop_factor", type="decimal", precision=10, scale=0, nullable=false)
|
|
|
|
*/
|
|
|
|
private $cropFactor = '1.0';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var boolean
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="is_working", type="boolean", nullable=false)
|
|
|
|
*/
|
|
|
|
private $isWorking;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="notes", type="text", nullable=true)
|
|
|
|
*/
|
|
|
|
private $notes;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="serial", type="string", length=20, nullable=false)
|
|
|
|
*/
|
|
|
|
private $serial;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var boolean
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="formerly_owned", type="boolean", nullable=false)
|
|
|
|
*/
|
|
|
|
private $formerlyOwned = false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="purchase_price", type="money", nullable=true)
|
|
|
|
*/
|
|
|
|
private $purchasePrice;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="battery_type", type="string", nullable=true)
|
|
|
|
*/
|
|
|
|
private $batteryType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="film_format", type="string", nullable=true)
|
|
|
|
*/
|
|
|
|
private $filmFormat = '135';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var boolean
|
|
|
|
*
|
|
|
|
* @ORM\Column(name="received", type="boolean", nullable=true)
|
|
|
|
*/
|
|
|
|
private $received = false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get id
|
|
|
|
*
|
|
|
|
* @return integer
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getId(): int
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set type
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @param CameraType $type
|
2017-11-30 15:06:13 -05:00
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setType(CameraType $type = null): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->type = $type;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get type
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return CameraType
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getType(): ?CameraType
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->type;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set brand
|
|
|
|
*
|
|
|
|
* @param string $brand
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setBrand($brand): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->brand = $brand;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get brand
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getBrand(): ?string
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->brand;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set mount
|
|
|
|
*
|
|
|
|
* @param string $mount
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setMount($mount): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->mount = $mount;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get mount
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getMount(): ?string
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->mount;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set model
|
|
|
|
*
|
|
|
|
* @param string $model
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setModel($model): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->model = $model;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get model
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getModel(): ?string
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->model;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set isDigital
|
|
|
|
*
|
|
|
|
* @param boolean $isDigital
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setIsDigital($isDigital): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->isDigital = $isDigital;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get isDigital
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getIsDigital(): ?bool
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->isDigital;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set cropFactor
|
|
|
|
*
|
|
|
|
* @param string $cropFactor
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setCropFactor($cropFactor): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->cropFactor = $cropFactor;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get cropFactor
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getCropFactor(): string
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->cropFactor;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set isWorking
|
|
|
|
*
|
|
|
|
* @param boolean $isWorking
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setIsWorking($isWorking): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->isWorking = $isWorking;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get isWorking
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getIsWorking(): ?bool
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->isWorking;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set notes
|
|
|
|
*
|
|
|
|
* @param string $notes
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setNotes($notes): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->notes = $notes;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get notes
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getNotes(): ?string
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->notes;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set serial
|
|
|
|
*
|
|
|
|
* @param string $serial
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setSerial($serial): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->serial = $serial;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get serial
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getSerial(): ?string
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->serial;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set formerlyOwned
|
|
|
|
*
|
|
|
|
* @param boolean $formerlyOwned
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setFormerlyOwned($formerlyOwned): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->formerlyOwned = $formerlyOwned;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get formerlyOwned
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getFormerlyOwned(): ?bool
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->formerlyOwned;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set batteryType
|
|
|
|
*
|
|
|
|
* @param string $batteryType
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setBatteryType($batteryType): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->batteryType = $batteryType;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get batteryType
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getBatteryType(): ?string
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->batteryType;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set filmFormat
|
|
|
|
*
|
|
|
|
* @param string $filmFormat
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setFilmFormat($filmFormat): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->filmFormat = $filmFormat;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get filmFormat
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getFilmFormat(): string
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->filmFormat;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set received
|
|
|
|
*
|
|
|
|
* @param boolean $received
|
|
|
|
*
|
2018-02-14 15:08:03 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function setReceived($received): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->received = $received;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get received
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
2018-02-14 15:08:03 -05:00
|
|
|
public function getReceived(): bool
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
return $this->received;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|