- Merged stash after pull

This commit is contained in:
mcndave committed 2020-10-16 15:27:54 +00:00
1 parent 114fa5be09
commit efa957fe58
20 files changed
+623 -436

No files matched your search

+124
View File
@@ -0,0 +1,124 @@
<?php
namespace Ulmus\Entity\InformationSchema;
use Ulmus\Entity\Field\Datetime;
/**
* @Table('name' => "columns", 'database' => "information_schema")
*/
class Column
{
use \Ulmus\EntityTrait;
/**
* @Field('name' => "TABLE_CATALOG", 'length' => 512)
*/
public string $tableCatalog;
/**
* @Field('name' => "TABLE_SCHEMA", 'length' => 64)
*/
public string $tableSchema;
/**
* @Field('name' => "TABLE_NAME", 'length' => 64)
*/
public string $tableName;
/**
* @Field('name' => "COLUMN_NAME", 'length' => 64, 'attributes' => [ 'primary_key' => true ])
*/
public string $name;
/**
* @Field('name' => "ORDINAL_POSITION", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public int $ordinalPosition;
/**
* @Field('name' => "COLUMN_DEFAULT", 'type' => "longtext")
*/
public ? string $default;
/**
* @Field('name' => "IS_NULLABLE", 'length' => 3)
*/
public string $nullable;
/**
* @Field('name' => "DATA_TYPE", 'length' => 64)
*/
public string $dataType;
/**
* @Field('name' => "CHARACTER_MAXIMUM_LENGTH", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? int $characterMaximumLength;
/**
* @Field('name' => "CHARACTER_OCTET_LENGTH", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? int $characterOctetLength;
/**
* @Field('name' => "NUMERIC_PRECISION", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? int $numericPrecision;
/**
* @Field('name' => "NUMERIC_SCALE", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? int $numericScale;
/**
* @Field('name' => "DATETIME_PRECISION", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? int $datetimePrecision;
/**
* @Field('name' => "CHARACTER_SET_NAME", 'length' => 32)
*/
public ? string $characterSetName;
/**
* @Field('name' => "COLLATION_NAME", 'length' => 32)
*/
public ? string $collationName;
/**
* @Field('name' => "COLLATION_TYPE", 'type' => "longtext")
*/
public string $type;
/**
* @Field('name' => "COLUMN_KEY", 'length' => 3)
*/
public string $key;
/**
* @Field('name' => "EXTRA", 'length' => 30)
*/
public string $extra;
/**
* @Field('name' => "PRIVILEGES", 'length' => 80)
*/
public string $privileges;
/**
* @Field('name' => "COLUMN_COMMENT", 'length' => 1024)
*/
public string $comment;
/**
* @Field('name' => "IS_GENERATED", 'length' => 6)
*/
public string $generated;
/**
* @Field('name' => "GENERATION_EXPRESSION", 'type' => "longtext")
*/
public ? string $generationExpression;
}
+135
View File
@@ -0,0 +1,135 @@
<?php
namespace Ulmus\Entity\InformationSchema;
use Ulmus\EntityCollection,
Ulmus\Entity\Field\Datetime;
/**
* @Table('name' => "tables", 'database' => "information_schema")
*/
class Table
{
use \Ulmus\EntityTrait;
/**
* @Field('name' => "TABLE_CATALOG", 'length' => 512)
*/
public string $catalog;
/**
* @Field('name' => "TABLE_SCHEMA", 'length' => 64)
*/
public string $schema;
/**
* @Field('name' => "TABLE_NAME", 'length' => 64, 'attributes' => [ 'primary_key' => true ])
*/
public string $name;
/**
* @Field('name' => "TABLE_TYPE", 'length' => 64)
*/
public string $type;
/**
* @Field('name' => "ENGINE", 'length' => 64)
*/
public ? string $engine ;
/**
* @Field('name' => "VERSION", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? string $version;
/**
* @Field('name' => "ROW_FORMAT", 'length' => 10)
*/
public ? string $rowFormat;
/**
* @Field('name' => "TABLE_ROWS", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? string $rows;
/**
* @Field('name' => "AVG_ROW_LENGTH", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? string $averageRowLength;
/**
* @Field('name' => "DATA_LENGTH", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? string $dataLength;
/**
* @Field('name' => "MAX_DATA_LENGTH", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? string $maxDataLength;
/**
* @Field('name' => "INDEX_LENGTH", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? string $indexLength;
/**
* @Field('name' => "DATA_FREE", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? string $dataFree;
/**
* @Field('name' => "AUTO_INCREMENT", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? string $autoIncrement;
/**
* @Field('name' => "CREATE_TIME")
*/
public ? Datetime $createTime;
/**
* @Field('name' => "UPDATE_TIME")
*/
public ? Datetime $updateTime;
/**
* @Field('name' => "CHECK_TIME")
*/
public ? Datetime $checkTime;
/**
* @Field('name' => "TABLE_COLLATION", 'length' => 32)
*/
public ? string $tableCollation;
/**
* @Field('name' => "CHECKSUM", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? string $checksum;
/**
* @Field('name' => "CREATE_OPTIONS", 'length' => 2048)
*/
public ? string $createOptions;
/**
* @Field('name' => "TABLE_COMMENT", 'length' => 2048)
*/
public string $tableComment;
/**
* @Field('name' => "MAX_INDEX_LENGTH", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
public ? int $maxIndexLength;
/**
* @Field('name' => "TEMPORARY", 'length' => 1)
*/
public ? string $temporary;
/**
* @Relation('oneToMany', 'key' => 'name', 'foreignKey' => Column::field('tableName'), 'entity' => Column::class)
* @Where('TABLE_SCHEMA', Column::field('tableSchema'))
*/
public EntityCollection $columns;
}