更新代码生成
This commit is contained in:
16
app/Service/core/CodeGenerationService.php
Normal file → Executable file
16
app/Service/core/CodeGenerationService.php
Normal file → Executable file
@@ -15,7 +15,9 @@ class CodeGenerationService
|
||||
{
|
||||
const TEXT_TYPE = [
|
||||
'LONGTEXT',
|
||||
'TEXT'
|
||||
'TEXT',
|
||||
'longtext',
|
||||
'text',
|
||||
];
|
||||
const INT_TYPE = [
|
||||
'INT',
|
||||
@@ -23,6 +25,13 @@ class CodeGenerationService
|
||||
'BIGINT',
|
||||
'SMALLINT',
|
||||
'FLOAT',
|
||||
'DECIMAL',
|
||||
'int',
|
||||
'tinyint',
|
||||
'bigint',
|
||||
'smallint',
|
||||
'float',
|
||||
'decimal',
|
||||
];
|
||||
private static mixed $_instance;
|
||||
|
||||
@@ -140,6 +149,8 @@ class CodeGenerationService
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
]);
|
||||
// 删除Store/app/www
|
||||
Storage::deleteDirectory('www');
|
||||
return [
|
||||
'id' => $insertModel->id,
|
||||
'file_name' => $insertModel->file_name
|
||||
@@ -444,6 +455,9 @@ class CodeGenerationService
|
||||
{
|
||||
if (empty($item)) return;
|
||||
// 设置列表字段
|
||||
if (!isset($item['tableShow'])) {
|
||||
ds($item);
|
||||
}
|
||||
if ($item['tableShow']) {
|
||||
$this->selectField .= ', "' . $item['name'] . '"';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user