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

        foreach ($columns['list'] as $val) {
            $comment = $val['comment'] ?: $val['name'];

            $propName = camelize($val['name']);

            $type = in_array($val['type'], ['tinyint', 'smallint', 'mediumint', 'int', 'integer', 'bigint'], true) ?
                'int' : 'string';

            $tmpProp = "
    /**
     * {$comment}.
     *
     * @var {$type}
     */
    private \${$propName};
";

            $props[] = $tmpProp;
        }

        return implode('', $props);
    }
protected function getProps(array $columns): string
    {
        $props = [];

        foreach ($columns['list'] as $val) {
            $comment = $val['comment'] ?: $val['name'];

            $propName = camelize($val['name']);

            $type = in_array($val['type'], ['tinyint', 'smallint', 'mediumint', 'int', 'integer', 'bigint'], true) ?
                'int' : 'string';

            $tmpProp = "
    /**
     * {$comment}.
     *
     * @var {$type}
     */
    private \${$propName};
";

            $props[] = $tmpProp;
        }

        return implode('', $props);
    }
获取属性信息.

@param array $columns

@return string