模型文件规范迁移到common模块

This commit is contained in:
Dev
2026-09-24 15:58:01 +08:00
parent df5809abdd
commit 36fb0ab1ee
9 changed files with 11 additions and 38 deletions
@@ -17,14 +17,14 @@ class Developers extends Backend
/** /**
* Developers模型对象 * Developers模型对象
* @var \app\admin\model\Developers * @var \app\common\model\Developers
*/ */
protected $model = null; protected $model = null;
public function _initialize() public function _initialize()
{ {
parent::_initialize(); parent::_initialize();
$this->model = new \app\admin\model\Developers; $this->model = new \app\common\model\Developers;
$this->view->assign("statusList", $this->model->getStatusList()); $this->view->assign("statusList", $this->model->getStatusList());
} }
@@ -19,14 +19,14 @@ class Commands extends Backend
/** /**
* Commands模型对象 * Commands模型对象
* @var \app\admin\model\auto\Commands * @var \app\common\model\auto\Commands
*/ */
protected $model = null; protected $model = null;
public function _initialize() public function _initialize()
{ {
parent::_initialize(); parent::_initialize();
$this->model = new \app\admin\model\auto\Commands; $this->model = new \app\common\model\auto\Commands;
$this->view->assign("statusList", $this->model->getStatusList()); $this->view->assign("statusList", $this->model->getStatusList());
} }
@@ -1,27 +0,0 @@
<?php
namespace app\admin\validate\account;
use think\Validate;
class Logs extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
@@ -4,7 +4,7 @@ namespace app\api\controller;
use app\common\controller\Api; use app\common\controller\Api;
use think\exception\HttpResponseException; use think\exception\HttpResponseException;
use app\admin\model\auto\Commands; use app\common\model\auto\Commands;
use think\Log; use think\Log;
/** /**
@@ -1,6 +1,6 @@
<?php <?php
namespace app\admin\model; namespace app\common\model;
use think\Model; use think\Model;
@@ -1,6 +1,6 @@
<?php <?php
namespace app\admin\model\auto; namespace app\common\model\auto;
use think\Model; use think\Model;
@@ -2,7 +2,7 @@
namespace app\common\service; namespace app\common\service;
use app\admin\model\Developers; use app\common\model\Developers;
use app\common\traits\ServiceTrait; use app\common\traits\ServiceTrait;
use Exception; use Exception;
use think\Db; use think\Db;
@@ -1,6 +1,6 @@
<?php <?php
namespace app\admin\validate; namespace app\common\validate;
use think\Validate; use think\Validate;
@@ -1,6 +1,6 @@
<?php <?php
namespace app\admin\validate\auto; namespace app\common\validate\auto;
use think\Validate; use think\Validate;