调整代码格式及使用常量去替换常用值

This commit is contained in:
柳清爽
2025-05-08 10:39:53 +08:00
parent b5939b36b3
commit 0426485177
31 changed files with 230 additions and 191 deletions

View File

@@ -12,6 +12,8 @@ class Administrator extends Model
{
use SoftDelete;
const MASTER_ID = 1;
// 设置数据表名
protected $name = 'administrators';

View File

@@ -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;
}

View File

@@ -9,6 +9,9 @@ use think\Model;
*/
class Menu extends Model
{
const STATUS_ACTIVE = 1;
const TOP_LEVEL = 0;
// 设置数据表名
protected $name = 'menus';
}

View File

@@ -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