Baz Bits
This commit is contained in:
parent
6940f541e3
commit
7fc42d75d2
3 changed files with 11 additions and 9 deletions
|
|
@ -5,5 +5,4 @@ namespace ⌬\Database\Entities;
|
|||
class Column extends Entity
|
||||
{
|
||||
protected $columnName;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace ⌬\Database\Entities;
|
||||
|
||||
use ⌬\Migrator\Traits\MySQLSupport;
|
||||
use ⌬\Migrator\Traits\Support;
|
||||
|
||||
abstract class Entity
|
||||
|
|
@ -20,13 +19,13 @@ abstract class Entity
|
|||
|
||||
/**
|
||||
* @param Support $container
|
||||
*
|
||||
* @return Entity
|
||||
*/
|
||||
public function setContainer(Support $container): Entity
|
||||
{
|
||||
$this->container = $container;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,19 +19,23 @@ class Table extends Entity
|
|||
|
||||
/**
|
||||
* @param mixed $tableName
|
||||
*
|
||||
* @return Table
|
||||
*/
|
||||
public function setTableName($tableName)
|
||||
{
|
||||
$this->tableName = $tableName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addColumn(string $name, array $options) : self
|
||||
public function addColumn(string $name, array $options): self
|
||||
{
|
||||
$this->columns[] = $column = (new Column())
|
||||
->setContainer($this->getContainer())
|
||||
->setOptions($options);
|
||||
->setOptions($options)
|
||||
;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue