collection-crud/src/Entity/CameraTrait.php

56 lines
1.7 KiB
PHP
Raw Normal View History

2018-02-14 15:08:03 -05: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
2022-02-17 14:00:50 -05:00
use Doctrine\ORM\Mapping as ORM;
2018-02-14 15:08:03 -05:00
/**
* Trait CameraTrait
*
* Shared columns for camera, and previously_owned_camera tables
*/
2017-11-30 15:06:13 -05:00
trait CameraTrait
{
2022-11-17 15:32:57 -05:00
use PurchasePrice;
2017-11-30 15:06:13 -05:00
2022-03-03 10:53:48 -05:00
#[ORM\ManyToOne(targetEntity: 'CameraType')]
2022-03-03 11:15:12 -05:00
#[ORM\JoinColumn(name: 'type_id', referencedColumnName: 'id', nullable: FALSE)]
2022-10-13 22:26:33 -04:00
private CameraType $type;
2022-02-18 11:34:25 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'brand', type: 'string', length: 64, nullable: FALSE)]
2022-10-13 22:26:33 -04:00
private string $brand;
2022-02-18 11:34:25 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'mount', type: 'string', length: 32, nullable: FALSE)]
2022-10-13 22:26:33 -04:00
private string $mount;
2022-02-18 11:34:25 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'model', type: 'string', length: 255, nullable: FALSE)]
2022-10-13 22:26:33 -04:00
private string $model;
2022-02-18 11:34:25 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'is_digital', type: 'boolean', nullable: FALSE)]
2022-10-13 22:26:33 -04:00
private bool $isDigital;
2022-02-18 11:34:25 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'crop_factor', type: 'decimal', precision: 10, scale: 0, nullable: FALSE)]
2022-03-03 10:53:48 -05:00
private string $cropFactor = '1.0';
2017-11-30 15:06:13 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'is_working', type: 'boolean', nullable: FALSE)]
2022-10-13 22:26:33 -04:00
private bool $isWorking;
2017-11-30 15:06:13 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)]
2022-10-13 22:26:33 -04:00
private ?string $notes = null;
2017-11-30 15:06:13 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'serial', type: 'string', length: 20, nullable: FALSE)]
2022-10-13 22:26:33 -04:00
private string $serial;
2017-11-30 15:06:13 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE)]
private bool $formerlyOwned = FALSE;
2017-11-30 15:06:13 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'battery_type', type: 'string', nullable: TRUE)]
2022-10-13 22:26:33 -04:00
private ?string $batteryType;
2017-11-30 15:06:13 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'film_format', type: 'string', nullable: TRUE)]
2022-03-03 10:53:48 -05:00
private ?string $filmFormat = '135';
2017-11-30 15:06:13 -05:00
2022-03-03 11:15:12 -05:00
#[ORM\Column(name: 'received', type: 'boolean', nullable: TRUE)]
private ?bool $received = FALSE;
2017-11-30 15:06:13 -05:00
}