2018-07-18 11:35:27 -04:00
|
|
|
<?php declare(strict_types=1);
|
2017-11-30 15:06:13 -05:00
|
|
|
|
2018-02-14 16:42:39 -05:00
|
|
|
namespace App\Entity;
|
2017-11-30 15:06:13 -05:00
|
|
|
|
2022-02-17 15:48:16 -05:00
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
2017-11-30 15:06:13 -05:00
|
|
|
trait LensTrait
|
|
|
|
{
|
2022-03-03 10:53:48 -05:00
|
|
|
use PurchasePriceTrait;
|
2022-09-30 10:49:02 -04:00
|
|
|
use GetSetTrait;
|
2017-11-30 15:06:13 -05:00
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'brand', type: 'string', length: 64, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $brand;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'coatings', type: 'string', length: 64, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $coatings;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'product_line', type: 'string', length: 64, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $productLine;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'model', type: 'string', length: 64, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $model;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'min_f_stop', type: 'string', length: 10, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $minFStop;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'max_f_stop', type: 'float', precision: 10, scale: 0, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?float $maxFStop;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'min_focal_length', type: 'integer', nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?int $minFocalLength;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'max_focal_length', type: 'integer', nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?int $maxFocalLength;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'serial', type: 'string', length: 10, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $serial;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $notes;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'image_size', type: 'string', nullable: FALSE, options: ['default' => '35mm'])]
|
2022-03-03 10:53:48 -05:00
|
|
|
private string $imageSize = '35mm';
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'mount', type: 'string', length: 40, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $mount;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'front_filter_size', type: 'decimal', precision: 10, scale: 0, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $frontFilterSize;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'rear_filter_size', type: 'decimal', precision: 10, scale: 0, nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?string $rearFilterSize;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'is_teleconverter', type: 'boolean', nullable: FALSE)]
|
|
|
|
private bool $isTeleconverter = FALSE;
|
2022-03-03 10:53:48 -05:00
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'design_elements', type: 'smallint', nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?int $designElements;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'design_groups', type: 'smallint', nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?int $designGroups;
|
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'aperture_blades', type: 'smallint', nullable: TRUE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private readonly ?int $apertureBlades;
|
2022-09-30 10:48:14 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function __get(string $name): mixed
|
|
|
|
{
|
|
|
|
if (property_exists($this, $name)) {
|
|
|
|
return $this->{$name};
|
|
|
|
}
|
2022-09-30 10:48:14 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
return NULL;
|
|
|
|
}
|
2017-11-30 15:06:13 -05:00
|
|
|
}
|