- WIP on PHP 8 attributes
This commit is contained in:
		
							parent
							
								
									88e9f048db
								
							
						
					
					
						commit
						26ffecbb6e
					
				| @ -7,11 +7,12 @@ class Field { | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = null, | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|         public mixed $default = null, | ||||
|         public bool $readonly = false, | ||||
|         public null|int $decimal = null, | ||||
|     ) {} | ||||
| } | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Bigint extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "bigint", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Bit extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "bit", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Blob extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "blob", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Decimal extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "decimal", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Float extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "float", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -11,7 +11,7 @@ class ForeignKey extends PrimaryKey { | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = 'bigint', | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [ | ||||
|             'primary_key' => false, | ||||
|  | ||||
| @ -7,7 +7,7 @@ class Id extends \Ulmus\Attribute\Property\Field { | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = 'bigint', | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [ | ||||
|             'unsigned' => true, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Longblob extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "longblob", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Longtext extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "longtext", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Mediumblob extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "mediumblob", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Mediumint extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "mediumint", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Mediumtext extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "mediumtext", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Numeric extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "numeric", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class PrimaryKey extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = 'bigint', | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [ | ||||
|             'primary_key' => true, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Smallint extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "smallint", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Text extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "text", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Blob extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "tinyblob", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Tinyint extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "tinyint", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
| @ -8,7 +8,7 @@ class Tinytext extends \Ulmus\Attribute\Property\Field | ||||
|     public function __construct( | ||||
|         public ? string $name = null, | ||||
|         public ? string $type = "tinytext", | ||||
|         public ? int $length = null, | ||||
|         public null|int|string $length = null, | ||||
|         public ? int $precision = null, | ||||
|         public array $attributes = [], | ||||
|         public bool $nullable = false, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user