模型文件规范迁移到common模块
This commit is contained in:
@@ -17,14 +17,14 @@ class Developers extends Backend
|
||||
|
||||
/**
|
||||
* Developers模型对象
|
||||
* @var \app\admin\model\Developers
|
||||
* @var \app\common\model\Developers
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Developers;
|
||||
$this->model = new \app\common\model\Developers;
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
}
|
||||
|
||||
|
||||
@@ -19,14 +19,14 @@ class Commands extends Backend
|
||||
|
||||
/**
|
||||
* Commands模型对象
|
||||
* @var \app\admin\model\auto\Commands
|
||||
* @var \app\common\model\auto\Commands
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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 think\exception\HttpResponseException;
|
||||
use app\admin\model\auto\Commands;
|
||||
use app\common\model\auto\Commands;
|
||||
use think\Log;
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
namespace app\common\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
@@ -29,7 +29,7 @@ class Developers extends Model
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['0' => __('Status 0'), '1' => __('Status 1')];
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model\auto;
|
||||
namespace app\common\model\auto;
|
||||
|
||||
use think\Model;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace app\common\service;
|
||||
|
||||
use app\admin\model\Developers;
|
||||
use app\common\model\Developers;
|
||||
use app\common\traits\ServiceTrait;
|
||||
use Exception;
|
||||
use think\Db;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
namespace app\common\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\auto;
|
||||
namespace app\common\validate\auto;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
Reference in New Issue
Block a user