调整代码格式及使用常量去替换常用值
This commit is contained in:
@@ -12,6 +12,8 @@ class Administrator extends Model
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
const MASTER_ID = 1;
|
||||
|
||||
// 设置数据表名
|
||||
protected $name = 'administrators';
|
||||
|
||||
|
||||
@@ -3,12 +3,15 @@
|
||||
namespace app\common\model;
|
||||
|
||||
use think\Model;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 设备任务配置模型类
|
||||
*/
|
||||
class DeviceTaskconf extends Model
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
// 设置表名
|
||||
protected $name = 'device_taskconf';
|
||||
|
||||
@@ -16,4 +19,5 @@ class DeviceTaskconf extends Model
|
||||
protected $autoWriteTimestamp = true;
|
||||
protected $createTime = 'createTime';
|
||||
protected $updateTime = 'updateTime';
|
||||
protected $defaultSoftDelete = 0;
|
||||
}
|
||||
@@ -9,6 +9,9 @@ use think\Model;
|
||||
*/
|
||||
class Menu extends Model
|
||||
{
|
||||
const STATUS_ACTIVE = 1;
|
||||
const TOP_LEVEL = 0;
|
||||
|
||||
// 设置数据表名
|
||||
protected $name = 'menus';
|
||||
}
|
||||
@@ -9,6 +9,14 @@ class User extends Model
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
const ADMIN_STP = 1;
|
||||
const ADMIN_OTP = 0;
|
||||
const NOT_USER = -1;
|
||||
const MASTER_USER = 1; // 操盘手
|
||||
const CUSTOMER_USER = 2; // 门店接待
|
||||
const STATUS_STOP = 0; // 禁用状态
|
||||
const STATUS_ACTIVE = 1; // 活动状态
|
||||
|
||||
/**
|
||||
* 数据表名
|
||||
* @var string
|
||||
|
||||
Reference in New Issue
Block a user