You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
675 B
PHP
37 lines
675 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Kartierung;
|
|
|
|
use Kartierung\Attribute\Column;
|
|
use Kartierung\Attribute\Id;
|
|
use Kartierung\Attribute\Table;
|
|
|
|
#[Table("simple-table")]
|
|
class FullEntity
|
|
{
|
|
public string $stringField;
|
|
#[Column('int-field')]
|
|
public int $intField;
|
|
#[Id]
|
|
#[Column('renamed-id-field')]
|
|
public int $idField;
|
|
|
|
public function setIdField(int $idField): void
|
|
{
|
|
$this->idField = $idField;
|
|
}
|
|
|
|
public function getIntField(): int
|
|
{
|
|
return $this->intField;
|
|
}
|
|
|
|
public function withStringField(string $stringField): self
|
|
{
|
|
$this->stringField = $stringField;
|
|
return $this;
|
|
}
|
|
}
|