Think/Build.php
public static function buildModel($module, $model)
    {
        $file = APP_PATH.$module.'/Model/'.$model.'Model.php';
        if (!is_file($file)) {
            $content = str_replace(['[MODULE]', '[MODEL]'], [$module, $model], static::$model);
            $dir = dirname($file);
            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }
            file_put_contents($file, $content);
        }
    }
public static function buildModel($module, $model)
    {
        $file = APP_PATH.$module.'/Model/'.$model.'Model.php';
        if (!is_file($file)) {
            $content = str_replace(['[MODULE]', '[MODEL]'], [$module, $model], static::$model);
            $dir = dirname($file);
            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }
            file_put_contents($file, $content);
        }
    }
创建模型类

@param $module
@param $model