474 lines
8.1 KiB
PHP
474 lines
8.1 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace CameraBundle\Entity;
|
||
|
|
||
|
use Doctrine\ORM\Mapping as ORM;
|
||
|
|
||
|
/**
|
||
|
* Camera.previouslyOwnedCamera
|
||
|
*
|
||
|
* @ORM\Table(name="previously_owned_camera", schema="camera", indexes={@ORM\Index(name="IDX_6EF94C6BC54C8C93", columns={"type_id"})})
|
||
|
* @ORM\Entity
|
||
|
*/
|
||
|
class PreviouslyOwnedCamera
|
||
|
{
|
||
|
/**
|
||
|
* @var integer
|
||
|
*
|
||
|
* @ORM\Column(name="id", type="integer", nullable=false)
|
||
|
* @ORM\Id
|
||
|
* @ORM\GeneratedValue(strategy="SEQUENCE")
|
||
|
* @ORM\SequenceGenerator(sequenceName="camera.previously_owned_camera_id_seq", allocationSize=1, initialValue=1)
|
||
|
*/
|
||
|
private $id;
|
||
|
|
||
|
/**
|
||
|
* @var string
|
||
|
*
|
||
|
* @ORM\Column(name="brand", type="string", length=64, nullable=false)
|
||
|
*/
|
||
|
private $brand;
|
||
|
|
||
|
/**
|
||
|
* @var string
|
||
|
*
|
||
|
* @ORM\Column(name="mount", type="string", length=10, 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="decimal", precision=10, scale=0, 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 = true;
|
||
|
|
||
|
/**
|
||
|
* @var \Camera.cameraType
|
||
|
*
|
||
|
* @ORM\ManyToOne(targetEntity="CameraType")
|
||
|
* @ORM\JoinColumns({
|
||
|
* @ORM\JoinColumn(name="type_id", referencedColumnName="id")
|
||
|
* })
|
||
|
*/
|
||
|
private $type;
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Get id
|
||
|
*
|
||
|
* @return integer
|
||
|
*/
|
||
|
public function getId()
|
||
|
{
|
||
|
return $this->id;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set brand
|
||
|
*
|
||
|
* @param string $brand
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setBrand($brand)
|
||
|
{
|
||
|
$this->brand = $brand;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get brand
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getBrand()
|
||
|
{
|
||
|
return $this->brand;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set mount
|
||
|
*
|
||
|
* @param string $mount
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setMount($mount)
|
||
|
{
|
||
|
$this->mount = $mount;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get mount
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getMount()
|
||
|
{
|
||
|
return $this->mount;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set model
|
||
|
*
|
||
|
* @param string $model
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setModel($model)
|
||
|
{
|
||
|
$this->model = $model;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get model
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getModel()
|
||
|
{
|
||
|
return $this->model;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set isDigital
|
||
|
*
|
||
|
* @param boolean $isDigital
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setIsDigital($isDigital)
|
||
|
{
|
||
|
$this->isDigital = $isDigital;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get isDigital
|
||
|
*
|
||
|
* @return boolean
|
||
|
*/
|
||
|
public function getIsDigital()
|
||
|
{
|
||
|
return $this->isDigital;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set cropFactor
|
||
|
*
|
||
|
* @param string $cropFactor
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setCropFactor($cropFactor)
|
||
|
{
|
||
|
$this->cropFactor = $cropFactor;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get cropFactor
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getCropFactor()
|
||
|
{
|
||
|
return $this->cropFactor;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set isWorking
|
||
|
*
|
||
|
* @param boolean $isWorking
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setIsWorking($isWorking)
|
||
|
{
|
||
|
$this->isWorking = $isWorking;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get isWorking
|
||
|
*
|
||
|
* @return boolean
|
||
|
*/
|
||
|
public function getIsWorking()
|
||
|
{
|
||
|
return $this->isWorking;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set notes
|
||
|
*
|
||
|
* @param string $notes
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setNotes($notes)
|
||
|
{
|
||
|
$this->notes = $notes;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get notes
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getNotes()
|
||
|
{
|
||
|
return $this->notes;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set serial
|
||
|
*
|
||
|
* @param string $serial
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setSerial($serial)
|
||
|
{
|
||
|
$this->serial = $serial;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get serial
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getSerial()
|
||
|
{
|
||
|
return $this->serial;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set formerlyOwned
|
||
|
*
|
||
|
* @param boolean $formerlyOwned
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setFormerlyOwned($formerlyOwned)
|
||
|
{
|
||
|
$this->formerlyOwned = $formerlyOwned;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get formerlyOwned
|
||
|
*
|
||
|
* @return boolean
|
||
|
*/
|
||
|
public function getFormerlyOwned()
|
||
|
{
|
||
|
return $this->formerlyOwned;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set purchasePrice
|
||
|
*
|
||
|
* @param string $purchasePrice
|
||
|
*
|
||
|
* @return Camera
|
||
|
*/
|
||
|
public function setPurchasePrice($purchasePrice)
|
||
|
{
|
||
|
$this->purchasePrice = $purchasePrice ?? 0;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get purchasePrice
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getPurchasePrice()
|
||
|
{
|
||
|
return (double) str_replace('$', '', (string)$this->purchasePrice) ?? 0;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set batteryType
|
||
|
*
|
||
|
* @param string $batteryType
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setBatteryType($batteryType)
|
||
|
{
|
||
|
$this->batteryType = $batteryType;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get batteryType
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getBatteryType()
|
||
|
{
|
||
|
return $this->batteryType;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set filmFormat
|
||
|
*
|
||
|
* @param string $filmFormat
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setFilmFormat($filmFormat)
|
||
|
{
|
||
|
$this->filmFormat = $filmFormat;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get filmFormat
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getFilmFormat()
|
||
|
{
|
||
|
return $this->filmFormat;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set received
|
||
|
*
|
||
|
* @param boolean $received
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setReceived($received)
|
||
|
{
|
||
|
$this->received = $received;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get received
|
||
|
*
|
||
|
* @return boolean
|
||
|
*/
|
||
|
public function getReceived()
|
||
|
{
|
||
|
return $this->received;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set type
|
||
|
*
|
||
|
* @param \CameraBundle\Entity\CameraType $type
|
||
|
*
|
||
|
* @return PreviouslyOwnedCamera
|
||
|
*/
|
||
|
public function setType(\CameraBundle\Entity\CameraType $type = null)
|
||
|
{
|
||
|
$this->type = $type;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get type
|
||
|
*
|
||
|
* @return \CameraBundle\Entity\CameraType
|
||
|
*/
|
||
|
public function getType()
|
||
|
{
|
||
|
return $this->type;
|
||
|
}
|
||
|
}
|