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-10-07 22:00:14 -04:00
|
|
|
use Doctrine\DBAL\Types\Types;
|
2017-11-30 15:06:13 -05:00
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
2022-03-03 10:53:48 -05:00
|
|
|
use Stringable;
|
2017-11-30 15:06:13 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* CameraType
|
|
|
|
*/
|
2022-09-29 20:09:31 -04:00
|
|
|
#[ORM\Table(name: 'camera_type', schema: 'collection')]
|
2022-02-17 15:10:57 -05:00
|
|
|
#[ORM\Entity]
|
2022-02-17 15:48:16 -05:00
|
|
|
class CameraType implements Stringable
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
#[ORM\Id]
|
|
|
|
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
|
|
|
|
#[ORM\SequenceGenerator(sequenceName: 'camera.camera_type_id_seq', allocationSize: 1, initialValue: 1)]
|
|
|
|
private int $id;
|
2022-02-18 11:34:25 -05:00
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'type', type: 'string', length: 255, nullable: FALSE)]
|
2022-03-03 10:53:48 -05:00
|
|
|
private string $type;
|
2022-02-18 11:34:25 -05:00
|
|
|
|
2022-03-03 11:15:12 -05:00
|
|
|
#[ORM\Column(name: 'description', type: 'text', nullable: TRUE)]
|
|
|
|
private ?string $description = NULL;
|
2022-02-18 11:34:25 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
/**
|
|
|
|
* Value for serialization
|
|
|
|
*/
|
|
|
|
public function __toString(): string
|
|
|
|
{
|
|
|
|
return $this->type;
|
|
|
|
}
|
2022-02-18 11:34:25 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
/**
|
|
|
|
* Get id
|
|
|
|
*/
|
|
|
|
public function getId(): int
|
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
2022-02-18 11:34:25 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
/**
|
|
|
|
* Set type
|
|
|
|
*/
|
|
|
|
public function setType(string $type): self
|
|
|
|
{
|
|
|
|
$this->type = $type;
|
2017-11-30 15:06:13 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
return $this;
|
|
|
|
}
|
2022-02-18 11:34:25 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
/**
|
|
|
|
* Set description
|
|
|
|
*/
|
|
|
|
public function setDescription(string $description): self
|
|
|
|
{
|
|
|
|
$this->description = $description;
|
2018-01-03 16:41:56 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
return $this;
|
|
|
|
}
|
2022-02-18 11:34:25 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
/**
|
|
|
|
* Get type
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getType(): ?string
|
|
|
|
{
|
|
|
|
return $this->type;
|
|
|
|
}
|
2022-02-18 11:34:25 -05:00
|
|
|
|
2022-03-03 10:53:48 -05:00
|
|
|
/**
|
|
|
|
* Get description
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getDescription(): ?string
|
|
|
|
{
|
|
|
|
return $this->description;
|
|
|
|
}
|
2017-11-30 15:06:13 -05:00
|
|
|
}
|