schema with beans instead of arrays
This commit is contained in:
		
							
								
								
									
										28
									
								
								beans/Schema.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								beans/Schema.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<?php
 | 
			
		||||
namespace DatabaseHelper\beans;
 | 
			
		||||
 | 
			
		||||
use DatabaseHelper\enums\Aggregation;
 | 
			
		||||
use DatabaseHelper\enums\Charset;
 | 
			
		||||
use DatabaseHelper\enums\Collation;
 | 
			
		||||
use DatabaseHelper\enums\Engine;
 | 
			
		||||
use http\Exception\InvalidArgumentException;
 | 
			
		||||
 | 
			
		||||
class Schema
 | 
			
		||||
{
 | 
			
		||||
    public string $name = '';
 | 
			
		||||
    public Primary $primary;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @var array<string, Column>
 | 
			
		||||
     */
 | 
			
		||||
    public array $columns = [];
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @var array<string, Reference>
 | 
			
		||||
     */
 | 
			
		||||
    public array $references = [];
 | 
			
		||||
 | 
			
		||||
    public Engine $engine = Engine::INNODB;
 | 
			
		||||
    public Charset $charset = Charset::UTF8;
 | 
			
		||||
    public Collation $collation = Collation::UTF8_GENERAL_CI;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user