Files
php-qml/framework/php/tests/snapshot/Todo.php
T

55 lines
915 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use PhpQml\Bridge\Attribute\BridgeResource;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity]
#[BridgeResource(name: 'todo')]
class Todo
{
#[ORM\Id]
#[ORM\Column(type: 'uuid', unique: true)]
private Uuid $id;
#[ORM\Column(length: 255)]
private string $title = '';
#[ORM\Column]
private bool $done = false;
public function __construct()
{
$this->id = Uuid::v7();
}
public function getId(): Uuid
{
return $this->id;
}
public function getTitle(): string
{
return $this->title;
}
public function setTitle(string $title): void
{
$this->title = $title;
}
public function isDone(): bool
{
return $this->done;
}
public function setDone(bool $done): void
{
$this->done = $done;
}
}