src/Leevel/Database/Console/Entity.php
protected function getStruct(array $columns): string
    {
        $struct = ['['];

        foreach ($columns['list'] as $val) {
            if ($val['primary_key']) {
                $struct[] = "        '{$val['name']}' => [
            'readonly' => true,
        ],";
            } else {
                $struct[] = "        '{$val['name']}' => [],";
            }
        }

        $struct[] = '    ]';

        return implode(PHP_EOL, $struct);
    }
protected function getStruct(array $columns): string
    {
        $struct = ['['];

        foreach ($columns['list'] as $val) {
            if ($val['primary_key']) {
                $struct[] = "        '{$val['name']}' => [
            'readonly' => true,
        ],";
            } else {
                $struct[] = "        '{$val['name']}' => [],";
            }
        }

        $struct[] = '    ]';

        return implode(PHP_EOL, $struct);
    }
获取结构信息.

@param array $columns

@return string