src/models/Schema.php
public function getColumns(array $columns, $indent = 0)
    {
        $definition = '';
        $textIndent = $this->textIndent($indent);
        foreach ($columns as $column) {
            $tmp = sprintf("'%s' => \$this->%s%s," . self::ENTER,
                $column->name, static::getSchemaType($column), static::other($column));

            if (null !== $column->enumValues) {
                $tmp = static::replaceEnumColumn($tmp);
            }
            $definition .= $textIndent . $tmp; // 处理缩进问题
        }
        return $definition;
    }
public function getColumns(array $columns, $indent = 0)
    {
        $definition = '';
        $textIndent = $this->textIndent($indent);
        foreach ($columns as $column) {
            $tmp = sprintf("'%s' => \$this->%s%s," . self::ENTER,
                $column->name, static::getSchemaType($column), static::other($column));

            if (null !== $column->enumValues) {
                $tmp = static::replaceEnumColumn($tmp);
            }
            $definition .= $textIndent . $tmp; // 处理缩进问题
        }
        return $definition;
    }
Returns the columns definition.
@param $columns array
@param int $indent the number of text indent
@return string