- 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

+10 -21
View File
@@ -4,40 +4,29 @@ namespace Ulmus\Entity\Sqlite;
use Ulmus\EntityCollection;
/**
* @Table('name' => "sqlite_master")
*/
use Ulmus\{Attribute\Obj\Table};
use Ulmus\Attribute\Property\{Field, Filter, FilterJoin, Relation, Join, Virtual, Where};
#[Table(name: "sqlite_master")]
class Schema
{
use \Ulmus\EntityTrait;
/**
* @Id
*/
#[Id]
public ? string $name;
/**
* @Field
*/
#[Field]
public ? string $type;
/**
* @Field('name' => 'tbl_name')
*/
#[Field(name: "tbl_name")]
public ? string $tableName;
/**
* @Field
*/
#[Field]
public ? int $rootpage;
/**
* @Field
*/
#[Field]
public ? string $sql;
/**
* @Relation('oneToMany', 'key' => 'tableName', 'foreignKey' => 'tableName', 'entity' => Schema::class)
*/
#[Relation("oneToMany", key: "tableName", foreignKey: "tableName", entity: "Schema")]
public EntityCollection $columns;
}