Add types to entities
This commit is contained in:
parent
4ac9c728de
commit
cebc5bd7b4
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trait CameraTrait
|
* Trait CameraTrait
|
||||||
*
|
*
|
||||||
@ -21,70 +23,70 @@ trait CameraTrait
|
|||||||
* @ORM\JoinColumn(name="type_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="type_id", referencedColumnName="id")
|
||||||
* })
|
* })
|
||||||
*/
|
*/
|
||||||
private $type;
|
private ?CameraType $type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="brand", type="string", length=64, nullable=false)
|
* @ORM\Column(name="brand", type="string", length=64, nullable=false)
|
||||||
*/
|
*/
|
||||||
private $brand;
|
private string $brand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="mount", type="string", length=32, nullable=false)
|
* @ORM\Column(name="mount", type="string", length=32, nullable=false)
|
||||||
*/
|
*/
|
||||||
private $mount;
|
private string $mount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="model", type="string", length=255, nullable=false)
|
* @ORM\Column(name="model", type="string", length=255, nullable=false)
|
||||||
*/
|
*/
|
||||||
private $model;
|
private string $model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="is_digital", type="boolean", nullable=false)
|
* @ORM\Column(name="is_digital", type="boolean", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $isDigital;
|
private bool $isDigital;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="crop_factor", type="decimal", precision=10, scale=0, nullable=false)
|
* @ORM\Column(name="crop_factor", type="decimal", precision=10, scale=0, nullable=false)
|
||||||
*/
|
*/
|
||||||
private $cropFactor = '1.0';
|
private string $cropFactor = '1.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="is_working", type="boolean", nullable=false)
|
* @ORM\Column(name="is_working", type="boolean", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $isWorking;
|
private bool $isWorking;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="notes", type="text", nullable=true)
|
* @ORM\Column(name="notes", type="text", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $notes;
|
private ?string $notes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="serial", type="string", length=20, nullable=false)
|
* @ORM\Column(name="serial", type="string", length=20, nullable=false)
|
||||||
*/
|
*/
|
||||||
private $serial;
|
private string $serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="formerly_owned", type="boolean", nullable=false)
|
* @ORM\Column(name="formerly_owned", type="boolean", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $formerlyOwned = false;
|
private bool $formerlyOwned = FALSE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
@ -98,21 +100,21 @@ trait CameraTrait
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="battery_type", type="string", nullable=true)
|
* @ORM\Column(name="battery_type", type="string", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $batteryType;
|
private ?string $batteryType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="film_format", type="string", nullable=true)
|
* @ORM\Column(name="film_format", type="string", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $filmFormat = '135';
|
private ?string $filmFormat = '135';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="received", type="boolean", nullable=true)
|
* @ORM\Column(name="received", type="boolean", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $received = false;
|
private ?bool $received = FALSE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
@ -155,7 +157,7 @@ trait CameraTrait
|
|||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setBrand($brand): self
|
public function setBrand(string $brand): self
|
||||||
{
|
{
|
||||||
$this->brand = $brand;
|
$this->brand = $brand;
|
||||||
|
|
||||||
@ -179,7 +181,7 @@ trait CameraTrait
|
|||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setMount($mount): self
|
public function setMount(string $mount): self
|
||||||
{
|
{
|
||||||
$this->mount = $mount;
|
$this->mount = $mount;
|
||||||
|
|
||||||
@ -203,7 +205,7 @@ trait CameraTrait
|
|||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setModel($model): self
|
public function setModel(string $model): self
|
||||||
{
|
{
|
||||||
$this->model = $model;
|
$this->model = $model;
|
||||||
|
|
||||||
@ -227,7 +229,7 @@ trait CameraTrait
|
|||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setIsDigital($isDigital): self
|
public function setIsDigital(bool $isDigital): self
|
||||||
{
|
{
|
||||||
$this->isDigital = $isDigital;
|
$this->isDigital = $isDigital;
|
||||||
|
|
||||||
@ -251,7 +253,7 @@ trait CameraTrait
|
|||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setCropFactor($cropFactor): self
|
public function setCropFactor(string $cropFactor): self
|
||||||
{
|
{
|
||||||
$this->cropFactor = $cropFactor;
|
$this->cropFactor = $cropFactor;
|
||||||
|
|
||||||
@ -275,7 +277,7 @@ trait CameraTrait
|
|||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setIsWorking($isWorking): self
|
public function setIsWorking(bool $isWorking): self
|
||||||
{
|
{
|
||||||
$this->isWorking = $isWorking;
|
$this->isWorking = $isWorking;
|
||||||
|
|
||||||
@ -435,5 +437,4 @@ trait CameraTrait
|
|||||||
{
|
{
|
||||||
return $this->received;
|
return $this->received;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,14 +27,14 @@ class CameraType
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="type", type="string", length=255, nullable=false)
|
* @ORM\Column(name="type", type="string", length=255, nullable=false)
|
||||||
*/
|
*/
|
||||||
private $type;
|
private string $type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="description", type="text", nullable=true)
|
* @ORM\Column(name="description", type="text", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $description;
|
private ?string $description;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,91 +26,91 @@ class Film {
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="brand", type="string", nullable=false)
|
* @ORM\Column(name="brand", type="string", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $brand;
|
private string $brand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="product_line", type="string", nullable=true)
|
* @ORM\Column(name="product_line", type="string", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $productLine;
|
private ?string $productLine;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="film_name", type="string", nullable=false)
|
* @ORM\Column(name="film_name", type="string", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $filmName;
|
private string $filmName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="film_alias", type="string", nullable=true)
|
* @ORM\Column(name="film_alias", type="string", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $filmAlias;
|
private ?string $filmAlias;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="film_speed_asa", type="integer", nullable=false)
|
* @ORM\Column(name="film_speed_asa", type="integer", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $filmSpeedAsa;
|
private int $filmSpeedAsa;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="film_speed_din", type="integer", nullable=false)
|
* @ORM\Column(name="film_speed_din", type="integer", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $filmSpeedDin;
|
private int $filmSpeedDin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="film_format", type="string", nullable=false)
|
* @ORM\Column(name="film_format", type="string", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $filmFormat;
|
private string $filmFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="film_base", type="string", nullable=false, options={"default"="Cellulose Triacetate"})
|
* @ORM\Column(name="film_base", type="string", nullable=false, options={"default"="Cellulose Triacetate"})
|
||||||
*/
|
*/
|
||||||
private $filmBase = 'Cellulose Triacetate';
|
private string $filmBase = 'Cellulose Triacetate';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="unused_rolls", type="integer", nullable=false, options={"default"=0})
|
* @ORM\Column(name="unused_rolls", type="integer", nullable=false, options={"default"=0})
|
||||||
*/
|
*/
|
||||||
private $unusedRolls = 0;
|
private int $unusedRolls = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="rolls_in_camera", type="integer", nullable=false, options={"default"=0})
|
* @ORM\Column(name="rolls_in_camera", type="integer", nullable=false, options={"default"=0})
|
||||||
*/
|
*/
|
||||||
private $rollsInCamera = 0;
|
private int $rollsInCamera = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="developed_rolls", type="integer", nullable=false, options={"default"=0})
|
* @ORM\Column(name="developed_rolls", type="integer", nullable=false, options={"default"=0})
|
||||||
*/
|
*/
|
||||||
private $developedRolls = 0;
|
private int $developedRolls = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="chemistry", type="string", nullable=false, options={"default"="C-41"})
|
* @ORM\Column(name="chemistry", type="string", nullable=false, options={"default"="C-41"})
|
||||||
*/
|
*/
|
||||||
private $chemistry = 'C-41';
|
private string $chemistry = 'C-41';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="notes", type="text", nullable=true)
|
* @ORM\Column(name="notes", type="text", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $notes;
|
private ?string $notes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
|
@ -15,21 +15,21 @@ class FilmFormat
|
|||||||
* @ORM\GeneratedValue
|
* @ORM\GeneratedValue
|
||||||
* @ORM\Column(type="integer")
|
* @ORM\Column(type="integer")
|
||||||
*/
|
*/
|
||||||
private $id;
|
private int $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="number_id", type="integer")
|
* @ORM\Column(name="number_id", type="integer")
|
||||||
*/
|
*/
|
||||||
private $numberId;
|
private int $numberId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="name", type="string")
|
* @ORM\Column(name="name", type="string")
|
||||||
*/
|
*/
|
||||||
private $name;
|
private string $name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
|
@ -29,7 +29,7 @@ class Flash
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="received", type="boolean", nullable=false, options={"default" : false})
|
* @ORM\Column(name="received", type="boolean", nullable=false, options={"default" : false})
|
||||||
*/
|
*/
|
||||||
private $received = false;
|
private bool $received = false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,5 +37,5 @@ class Flash
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="formerly_owned", type="boolean", nullable=false, options={"default" : false})
|
* @ORM\Column(name="formerly_owned", type="boolean", nullable=false, options={"default" : false})
|
||||||
*/
|
*/
|
||||||
private $formerlyOwned = false;
|
private bool $formerlyOwned = false;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
trait FlashTrait
|
trait FlashTrait
|
||||||
{
|
{
|
||||||
use PurchasePriceTrait;
|
use PurchasePriceTrait;
|
||||||
@ -11,91 +13,91 @@ trait FlashTrait
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="brand", type="string", nullable=false)
|
* @ORM\Column(name="brand", type="string", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $brand;
|
private string $brand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="model", type="string", nullable=false)
|
* @ORM\Column(name="model", type="string", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $model;
|
private string $model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="is_auto_flash", type="boolean", nullable=false)
|
* @ORM\Column(name="is_auto_flash", type="boolean", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $isAutoFlash = false;
|
private bool $isAutoFlash = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="is_ttl", type="boolean", nullable=false)
|
* @ORM\Column(name="is_ttl", type="boolean", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $isTtl = false;
|
private bool $isTtl = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="ttl_type", type="string", nullable=false)
|
* @ORM\Column(name="ttl_type", type="string", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $ttlType = 'N / A';
|
private string $ttlType = 'N / A';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="is_p_ttl", type="boolean", nullable=false)
|
* @ORM\Column(name="is_p_ttl", type="boolean", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $isPTtl = false;
|
private bool $isPTtl = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="p_ttl_type", type="string", nullable=false)
|
* @ORM\Column(name="p_ttl_type", type="string", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $pTtlType = 'N / A';
|
private string $pTtlType = 'N / A';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="guide_number", type="string", nullable=true)
|
* @ORM\Column(name="guide_number", type="string", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $guideNumber;
|
private string $guideNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="purchase_price", type="money", nullable=true)
|
* @ORM\Column(name="purchase_price", type="money", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $purchasePrice;
|
private ?string $purchasePrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="batteries", type="string", nullable=false)
|
* @ORM\Column(name="batteries", type="string", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $batteries = '4x AA';
|
private string $batteries = '4x AA';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="notes", type="text", nullable=true)
|
* @ORM\Column(name="notes", type="text", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $notes;
|
private ?string $notes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="serial", type="string", nullable=true)
|
* @ORM\Column(name="serial", type="string", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $serial;
|
private ?string $serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
*
|
*
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function getId()
|
public function getId(): int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
@ -105,7 +107,7 @@ trait FlashTrait
|
|||||||
*
|
*
|
||||||
* @param string $brand
|
* @param string $brand
|
||||||
*
|
*
|
||||||
* @return Flash
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setBrand($brand)
|
public function setBrand($brand)
|
||||||
{
|
{
|
||||||
@ -249,9 +251,9 @@ trait FlashTrait
|
|||||||
*
|
*
|
||||||
* @param string $pTtlType
|
* @param string $pTtlType
|
||||||
*
|
*
|
||||||
* @return Flash
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setPTtlType($pTtlType)
|
public function setPTtlType($pTtlType): self
|
||||||
{
|
{
|
||||||
$this->pTtlType = $pTtlType;
|
$this->pTtlType = $pTtlType;
|
||||||
|
|
||||||
@ -273,7 +275,7 @@ trait FlashTrait
|
|||||||
*
|
*
|
||||||
* @param string $guideNumber
|
* @param string $guideNumber
|
||||||
*
|
*
|
||||||
* @return Flash
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setGuideNumber($guideNumber)
|
public function setGuideNumber($guideNumber)
|
||||||
{
|
{
|
||||||
@ -299,7 +301,7 @@ trait FlashTrait
|
|||||||
*
|
*
|
||||||
* @return Flash
|
* @return Flash
|
||||||
*/
|
*/
|
||||||
public function setBatteries($batteries)
|
public function setBatteries($batteries): self
|
||||||
{
|
{
|
||||||
$this->batteries = $batteries;
|
$this->batteries = $batteries;
|
||||||
|
|
||||||
@ -323,7 +325,7 @@ trait FlashTrait
|
|||||||
*
|
*
|
||||||
* @return Flash
|
* @return Flash
|
||||||
*/
|
*/
|
||||||
public function setNotes($notes)
|
public function setNotes($notes): self
|
||||||
{
|
{
|
||||||
$this->notes = $notes;
|
$this->notes = $notes;
|
||||||
|
|
||||||
@ -347,7 +349,7 @@ trait FlashTrait
|
|||||||
*
|
*
|
||||||
* @return Flash
|
* @return Flash
|
||||||
*/
|
*/
|
||||||
public function setSerial($serial)
|
public function setSerial($serial): self
|
||||||
{
|
{
|
||||||
$this->serial = $serial;
|
$this->serial = $serial;
|
||||||
|
|
||||||
@ -371,7 +373,7 @@ trait FlashTrait
|
|||||||
*
|
*
|
||||||
* @return Flash
|
* @return Flash
|
||||||
*/
|
*/
|
||||||
public function setFormerlyOwned($formerlyOwned)
|
public function setFormerlyOwned($formerlyOwned): self
|
||||||
{
|
{
|
||||||
$this->formerlyOwned = $formerlyOwned;
|
$this->formerlyOwned = $formerlyOwned;
|
||||||
|
|
||||||
@ -395,7 +397,7 @@ trait FlashTrait
|
|||||||
*
|
*
|
||||||
* @return Flash
|
* @return Flash
|
||||||
*/
|
*/
|
||||||
public function setReceived($received)
|
public function setReceived($received): self
|
||||||
{
|
{
|
||||||
$this->received = $received;
|
$this->received = $received;
|
||||||
|
|
||||||
|
@ -11,133 +11,133 @@ trait LensTrait
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="brand", type="string", length=64, nullable=true)
|
* @ORM\Column(name="brand", type="string", length=64, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $brand;
|
private ?string $brand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="coatings", type="string", length=64, nullable=true)
|
* @ORM\Column(name="coatings", type="string", length=64, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $coatings;
|
private ?string $coatings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="product_line", type="string", length=64, nullable=true)
|
* @ORM\Column(name="product_line", type="string", length=64, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $productLine;
|
private ?string $productLine;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="model", type="string", length=64, nullable=true)
|
* @ORM\Column(name="model", type="string", length=64, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $model;
|
private ?string $model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="min_f_stop", type="string", length=10, nullable=true)
|
* @ORM\Column(name="min_f_stop", type="string", length=10, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $minFStop;
|
private ?string $minFStop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var float
|
* @var float
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="max_f_stop", type="float", precision=10, scale=0, nullable=true)
|
* @ORM\Column(name="max_f_stop", type="float", precision=10, scale=0, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $maxFStop;
|
private ?float $maxFStop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="min_focal_length", type="integer", nullable=true)
|
* @ORM\Column(name="min_focal_length", type="integer", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $minFocalLength;
|
private ?int $minFocalLength;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="max_focal_length", type="integer", nullable=true)
|
* @ORM\Column(name="max_focal_length", type="integer", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $maxFocalLength;
|
private ?int $maxFocalLength;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="serial", type="string", length=10, nullable=true)
|
* @ORM\Column(name="serial", type="string", length=10, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $serial;
|
private ?string $serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="purchase_price", type="money", nullable=true)
|
* @ORM\Column(name="purchase_price", type="money", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $purchasePrice;
|
private ?string $purchasePrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="notes", type="text", nullable=true)
|
* @ORM\Column(name="notes", type="text", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $notes;
|
private ?string $notes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="image_size", type="string", nullable=false, options={"default"="35mm"})
|
* @ORM\Column(name="image_size", type="string", nullable=false, options={"default"="35mm"})
|
||||||
*/
|
*/
|
||||||
private $imageSize = '35mm';
|
private string $imageSize = '35mm';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="mount", type="string", length=40, nullable=true)
|
* @ORM\Column(name="mount", type="string", length=40, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $mount;
|
private ?string $mount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="front_filter_size", type="decimal", precision=10, scale=0, nullable=true)
|
* @ORM\Column(name="front_filter_size", type="decimal", precision=10, scale=0, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $frontFilterSize;
|
private ?string $frontFilterSize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="rear_filter_size", type="decimal", precision=10, scale=0, nullable=true)
|
* @ORM\Column(name="rear_filter_size", type="decimal", precision=10, scale=0, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $rearFilterSize;
|
private? string $rearFilterSize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="is_teleconverter", type="boolean", nullable=false)
|
* @ORM\Column(name="is_teleconverter", type="boolean", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $isTeleconverter = false;
|
private bool $isTeleconverter = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="design_elements", type="smallint", nullable=true)
|
* @ORM\Column(name="design_elements", type="smallint", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $designElements;
|
private ?int $designElements;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="design_groups", type="smallint", nullable=true)
|
* @ORM\Column(name="design_groups", type="smallint", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $designGroups;
|
private ?int $designGroups;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="aperture_blades", type="smallint", nullable=true)
|
* @ORM\Column(name="aperture_blades", type="smallint", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $apertureBlades;
|
private ?int $apertureBlades;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +28,7 @@ class PreviouslyOwnedFlash
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="received", type="boolean", nullable=false, options={"default" : true})
|
* @ORM\Column(name="received", type="boolean", nullable=false, options={"default" : true})
|
||||||
*/
|
*/
|
||||||
private $received = true;
|
private bool $received = true;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,5 +36,5 @@ class PreviouslyOwnedFlash
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="formerly_owned", type="boolean", nullable=false, options={"default" : true})
|
* @ORM\Column(name="formerly_owned", type="boolean", nullable=false, options={"default" : true})
|
||||||
*/
|
*/
|
||||||
private $formerlyOwned = true;
|
private bool $formerlyOwned = true;
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,12 @@ class PreviouslyOwnedLenses
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="received", type="boolean", nullable=false)
|
* @ORM\Column(name="received", type="boolean", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $received = true;
|
private bool $received = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="formerly_owned", type="boolean", nullable=false)
|
* @ORM\Column(name="formerly_owned", type="boolean", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $formerlyOwned = true;
|
private bool $formerlyOwned = true;
|
||||||
}
|
}
|
||||||
|
@ -3,19 +3,19 @@
|
|||||||
namespace App\ValueObject;
|
namespace App\ValueObject;
|
||||||
|
|
||||||
class Money {
|
class Money {
|
||||||
private $value;
|
private float $value;
|
||||||
|
|
||||||
public function __construct($value)
|
public function __construct($value)
|
||||||
{
|
{
|
||||||
$this->value = (float)str_replace(['$',','], '', $value);
|
$this->value = (float)str_replace(['$',','], '', $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getValue()
|
public function getValue(): float
|
||||||
{
|
{
|
||||||
return (float)str_replace(['$',','], '', $this->value);
|
return (float)str_replace(['$',','], '', $this->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __toString()
|
public function __toString(): string
|
||||||
{
|
{
|
||||||
return (string)$this->getValue();
|
return (string)$this->getValue();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user