| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- /**
- * +----------------------------------------------------------------------
- * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
- * +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
- * +----------------------------------------------------------------------
- * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
- * +----------------------------------------------------------------------
- * | Author: CRMEB Team <admin@crmeb.com>
- * +----------------------------------------------------------------------
- */
- namespace crmeb\services\crud;
- /**
- * Class Model
- * @author 等风来
- * @email 136327134@qq.com
- * @date 2023/3/13
- * @package crmeb\command\crud
- */
- class Model extends Make
- {
- /**
- * 当前命令名称
- * @var string
- */
- protected $name = "model";
- /**
- * @return string
- * @author 等风来
- * @email 136327134@qq.com
- * @date 2023/4/4
- */
- protected function setBaseDir(): string
- {
- return 'app' . DS . 'model' . DS . 'crud';
- }
- protected function getFilePathName(string $path, string $name): string
- {
- $path = ltrim(str_replace('\\', '/', $path), '/');
- return $this->getBasePath($path) . $name . '.' . $this->fileMime;
- }
- /**
- * 模板文件
- * @param string $type
- * @return string
- * @author 等风来
- * @email 136327134@qq.com
- * @date 2023/3/13
- */
- protected function getStub(string $type = '')
- {
- return __DIR__ . DS . 'stubs' . DS . 'model' . DS . 'CrudModel.stub';
- }
- }
|