collection-crud/src/Entity/LensTrait.php

76 lines
2.5 KiB
PHP
Raw Normal View History

2018-07-18 11:35:27 -04:00
<?php declare(strict_types=1);
2017-11-30 15:06:13 -05:00
namespace App\Entity;
2017-11-30 15:06:13 -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-29 20:09:31 -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
public function __get(string $name): mixed
{
if (property_exists($this, $name))
{
return $this->$name;
}
return null;
}
2017-11-30 15:06:13 -05:00
}