- Migrated Entity's file into attributes

This commit is contained in:
mcndave committed 2023-03-23 15:09:42 +00:00
1 parent fa8adcace1
commit 43880eb428
4 files changed
+77 -191

No files matched your search

+27 -70
View File
@@ -4,121 +4,78 @@ namespace Ulmus\Entity\InformationSchema;
use Ulmus\Entity\Field\Datetime;
/**
* @Table('name' => "columns", 'database' => "information_schema")
*/
use Ulmus\{Attribute\Obj\Table};
use Ulmus\Attribute\Property\{Field, Filter, FilterJoin, Relation, Join, Virtual, Where};
#[Table(name: "columns", database: "information_schema")]
class Column
{
use \Ulmus\EntityTrait;
/**
* @Field('name' => "TABLE_CATALOG", 'length' => 512)
*/
#[Field(name: "TABLE_CATALOG", length: 512)]
public string $tableCatalog;
/**
* @Field('name' => "TABLE_SCHEMA", 'length' => 64)
*/
#[Field(name: "TABLE_SCHEMA", length: 64)]
public string $tableSchema;
/**
* @Field('name' => "TABLE_NAME", 'length' => 64)
*/
#[Field(name: "TABLE_NAME", length: 64)]
public string $tableName;
/**
* @Field('name' => "COLUMN_NAME", 'length' => 64, 'attributes' => [ 'primary_key' => true ])
*/
#[Field(name: "COLUMN_NAME", length: 64, attributes: [ 'unsigned' => true, ])]
public string $name;
/**
* @Field('name' => "ORDINAL_POSITION", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
#[Field(name: "ORDINAL_POSITION", type: "bigint", length: 21, attributes: [ 'unsigned' => true, ])]
public int $ordinalPosition;
/**
* @Field('name' => "COLUMN_DEFAULT", 'type' => "longtext")
*/
#[Field(name: "COLUMN_DEFAULT", type: "longtext")]
public ? string $default;
/**
* @Field('name' => "IS_NULLABLE", 'length' => 3)
*/
#[Field(name: "IS_NULLABLE", length: 3)]
public string $nullable;
/**
* @Field('name' => "DATA_TYPE", 'length' => 64)
*/
#[Field(name: "DATA_TYPE", length: 64)]
public string $dataType;
/**
* @Field('name' => "CHARACTER_MAXIMUM_LENGTH", 'type' => "bigint", 'length' => 21, 'attributes' => [ 'unsigned' => true ])
*/
#[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 ])
*/
#[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 ])
*/
#[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 ])
*/
#[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 ])
*/
#[Field(name: "DATETIME_PRECISION", type: "bigint", length: 21, attributes: [ 'unsigned' => true, ])]
public ? int $datetimePrecision;
/**
* @Field('name' => "CHARACTER_SET_NAME", 'length' => 32)
*/
#[Field(name: "CHARACTER_SET_NAME", length: 32)]
public ? string $characterSetName;
/**
* @Field('name' => "COLLATION_NAME", 'length' => 32)
*/
#[Field(name: "COLLATION_NAME", length: 32)]
public ? string $collationName;
/**
* @Field('name' => "COLLATION_TYPE", 'type' => "longtext")
*/
public string $type;
# #[Field(name: "COLLATION_TYPE", type: "longtext")]
# public string $type;
/**
* @Field('name' => "COLUMN_KEY", 'length' => 3)
*/
#[Field(name: "COLUMN_KEY", length: 3)]
public string $key;
/**
* @Field('name' => "EXTRA", 'length' => 30)
*/
#[Field(name: "EXTRA", length: 30)]
public string $extra;
/**
* @Field('name' => "PRIVILEGES", 'length' => 80)
*/
#[Field(name: "PRIVILEGES", length: 80)]
public string $privileges;
/**
* @Field('name' => "COLUMN_COMMENT", 'length' => 1024)
*/
#[Field(name: "COLUMN_COMMENT", length: 1024)]
public string $comment;
/**
* @Field('name' => "IS_GENERATED", 'length' => 6)
*/
#[Field(name: "IS_GENERATED", length: 6)]
public string $generated;
/**
* @Field('name' => "GENERATION_EXPRESSION", 'type' => "longtext")
*/
#[Field(name: "GENERATION_EXPRESSION", type: "longtext")]
public ? string $generationExpression;
}