34 lines
587 B
PHP
34 lines
587 B
PHP
<?php
|
|
|
|
namespace Ulmus\Annotation\Property;
|
|
|
|
class Field implements \Notes\Annotation {
|
|
|
|
public string $type;
|
|
|
|
public string $name;
|
|
|
|
public int|string $length;
|
|
|
|
public int $precision;
|
|
|
|
public array $attributes = [];
|
|
|
|
public bool $nullable;
|
|
|
|
public /* mixed */ $default;
|
|
|
|
public bool $readonly = false;
|
|
|
|
public function __construct(? string $type = null, ? int $length = null)
|
|
{
|
|
if ( $type !== null ) {
|
|
$this->type = $type;
|
|
}
|
|
|
|
if ( $length !== null ) {
|
|
$this->length = $length;
|
|
}
|
|
}
|
|
}
|