You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
826 B

<?php
namespace Darksparrow\DeegraphPHP\SchemaBuilder\Attributes;
use Darksparrow\DeegraphPHP\Enumerators\SchemaFieldExistence;
use PhpParser\Node\Attribute;
use PhpParser\Node\Name;
#[\Attribute]
class SchemaDocumentField extends Attribute
{
public string $Name;
public SchemaFieldExistence $Existence;
public string $Comment;
public array $ValidSchemas;
public int $MaxSize;
public function __construct(
string $Name,
SchemaFieldExistence $Existence = SchemaFieldExistence::MAY,
string $Comment = "",
array $ValidSchemas = [],
int $MaxSize = 0
)
{
$this->Existence = $Existence;
$this->Comment = $Comment;
$this->ValidSchemas = $ValidSchemas;
parent::__construct(new Name("SchemaDocumentField"), [], []);
}
}