- Added description to most attributes

This commit is contained in:
Dave Mc Nicoll 2024-05-27 18:09:22 +00:00
parent e37eeb85f1
commit 2de3139c80
32 changed files with 48 additions and 8 deletions

View File

@ -10,6 +10,7 @@ class Table implements AdapterAttributeInterface {
public ? string $schema = null,
public ? string $adapter = null,
public ? string $engine = null,
public string $description = "",
) {}
public function adapter() : false|string

View File

@ -14,5 +14,6 @@ class Field {
public mixed $default = null,
public bool $readonly = false,
public null|int $decimal = null,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Bigint extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Bit extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Blob extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -13,5 +13,6 @@ class CreatedAt extends \Ulmus\Attribute\Property\Field {
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -11,5 +11,6 @@ class Date extends \Ulmus\Attribute\Property\Field {
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -11,5 +11,6 @@ class Datetime extends \Ulmus\Attribute\Property\Field {
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Decimal extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Float extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -26,6 +26,7 @@ class ForeignKey extends PrimaryKey {
public null|string $relation = null,
public ConstrainActionEnum $onDelete = ConstrainActionEnum::NoAction,
public ConstrainActionEnum $onUpdate = ConstrainActionEnum::NoAction,
public string $description = "",
) {
#$this->references = Attribute::handleArrayField($this->references, false);
}

View File

@ -17,5 +17,6 @@ class Id extends \Ulmus\Attribute\Property\Field {
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Longblob extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Longtext extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Mediumblob extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Mediumint extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Mediumtext extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Numeric extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -16,5 +16,6 @@ class PrimaryKey extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Smallint extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Text extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -5,8 +5,13 @@ namespace Ulmus\Attribute\Property\Field;
#[\Attribute(\Attribute::TARGET_PROPERTY)]
class Time extends \Ulmus\Attribute\Property\Field
{
public function __construct(? string $type = "time", ? int $length = null)
{
parent::__construct($type, $length);
}
public function __construct(
public ? string $name = null,
public ? string $type = "time",
public array $attributes = [],
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -5,8 +5,13 @@ namespace Ulmus\Attribute\Property\Field;
#[\Attribute(\Attribute::TARGET_PROPERTY)]
class Timestamp extends \Ulmus\Attribute\Property\Field
{
public function __construct(? string $type = "timestamp", ? int $length = null)
{
parent::__construct($type, $length);
}
public function __construct(
public ? string $name = null,
public ? string $type = "timestamp",
public array $attributes = [],
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Blob extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Tinyint extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -14,5 +14,6 @@ class Tinytext extends \Ulmus\Attribute\Property\Field
public bool $nullable = false,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -15,5 +15,6 @@ class UpdatedAt extends \Ulmus\Attribute\Property\Field
public bool $nullable = true,
public mixed $default = null,
public bool $readonly = false,
public string $description = "",
) {}
}

View File

@ -9,5 +9,6 @@ class SearchGroupBy extends SearchParameter
{
public function __construct(
public null|string|\Stringable|array $field = null,
public string $description = "",
) {}
}

View File

@ -12,5 +12,6 @@ class SearchLike extends SearchParameter
public null|string|\Stringable|array $field = null,
public bool $toggle = false,
public SearchMethodEnum $method = SearchMethodEnum::Like,
public string $description = "",
) {}
}

View File

@ -15,5 +15,6 @@ class SearchOrderBy extends SearchParameter
public ? string $parameter = null,
public null|string|\Stringable|array $field = null,
public null|SearchMethodEnum $order = null,
public string $description = "",
) {}
}

View File

@ -10,5 +10,6 @@ class SearchRequestParameter
public function __construct(
public string $class,
public ? string $alias = null,
public string $description = "",
) {}
}

View File

@ -12,5 +12,6 @@ class SearchWhere extends SearchParameter
public null|string|\Stringable|array $field = null,
public bool $toggle = false,
public SearchMethodEnum $method = SearchMethodEnum::Where,
public string $description = "",
) {}
}