# tp-model-creater **Repository Path**: bird2024/tp-model-creater ## Basic Information - **Project Name**: tp-model-creater - **Description**: thinkphp orm模型自动创建帮助类库 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-25 - **Last Updated**: 2025-09-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # tp-model-creater ## 仓库地址 https://gitee.com/bird2024/tp-model-creater.git #### 介绍 thinkphp orm模型自动创建帮助类库 #### 软件架构 软件架构说明 #### 安装教程 #### 使用说明 1.先从composer引入 ~~~ composer require itbbn/thinkphp-model-creater ~~~ 2.本地建命令行,例如:“ModelCreator.php” 3.编写命令行配置 ~~~ writeln("开始创建模型"); $this->createOtaModel(); $this->writeln("模型创建完成"); } private function createOtaModel(): void { $otaOption = [ 'database' => config('database'), 'app' => [ //命名空间 "namespace" => 'app\\common\\model', //模型基类命名空间 "baseNamespace" => "base", //baseModel的类名 "baseModel" => "BaseModel",//注意,名字最好唯一 //模型目录 "path" => "/app/common/model/", 'connection' => "mysql", //root 目录 "root" => root_path(), //是否开启调试模式 "debug" => true, 'isThinkPhp' => true, 'thinkPhpDbConnection' => 'mysql', 'baseDir' => '', ], ]; // print_r($otaOption); echo "开始了"; $modelCreator = new \Itbbn\ThinkphpModelCreater\lib\ModelCreator($otaOption); echo "当前版本:" . $modelCreator->getVersion() . "\n"; $modelCreator->start(); } } ~~~ 4.运行命令行 #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技