58 lines
1.3 KiB
PHP
58 lines
1.3 KiB
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\LensesRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* Camera.lenses
|
|
*/
|
|
#[ORM\Table(name: 'lenses', schema: 'collection')]
|
|
#[ORM\Entity(repositoryClass: LensesRepository::class)]
|
|
class Lenses
|
|
{
|
|
use LensTrait;
|
|
|
|
#[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
|
|
#[ORM\SequenceGenerator(sequenceName: 'camera.lenses_id_seq', allocationSize: 1, initialValue: 1)]
|
|
private int $id;
|
|
|
|
#[ORM\Column(name: 'received', type: 'boolean', nullable: FALSE)]
|
|
private bool $received = FALSE;
|
|
|
|
#[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE)]
|
|
private bool $formerlyOwned = FALSE;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function isReceived(): ?bool
|
|
{
|
|
return $this->received;
|
|
}
|
|
|
|
public function setReceived(bool $received): self
|
|
{
|
|
$this->received = $received;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isFormerlyOwned(): ?bool
|
|
{
|
|
return $this->formerlyOwned;
|
|
}
|
|
|
|
public function setFormerlyOwned(bool $formerlyOwned): self
|
|
{
|
|
$this->formerlyOwned = $formerlyOwned;
|
|
|
|
return $this;
|
|
}
|
|
}
|