84 lines
1.6 KiB
PHP
84 lines
1.6 KiB
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\DBAL\Types\Types;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Stringable;
|
|
|
|
/**
|
|
* CameraType
|
|
*/
|
|
#[ORM\Table(name: 'camera_type', schema: 'collection')]
|
|
#[ORM\Entity]
|
|
class CameraType implements Stringable
|
|
{
|
|
#[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
|
|
#[ORM\SequenceGenerator(sequenceName: 'camera.camera_type_id_seq', allocationSize: 1, initialValue: 1)]
|
|
private int $id;
|
|
|
|
#[ORM\Column(name: 'type', type: 'string', length: 255, nullable: FALSE)]
|
|
private string $type;
|
|
|
|
#[ORM\Column(name: 'description', type: 'text', nullable: TRUE)]
|
|
private ?string $description = NULL;
|
|
|
|
/**
|
|
* Value for serialization
|
|
*/
|
|
public function __toString(): string
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
/**
|
|
* Get id
|
|
*/
|
|
public function getId(): int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set type
|
|
*/
|
|
public function setType(string $type): self
|
|
{
|
|
$this->type = $type;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Set description
|
|
*/
|
|
public function setDescription(string $description): self
|
|
{
|
|
$this->description = $description;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get type
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getType(): ?string
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
/**
|
|
* Get description
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getDescription(): ?string
|
|
{
|
|
return $this->description;
|
|
}
|
|
}
|