优化tenant模式

This commit is contained in:
2026-03-09 18:27:05 +08:00
parent bf0daf987b
commit e09b4c639c
14 changed files with 167 additions and 73 deletions
+1
View File
@@ -15,6 +15,7 @@ class AdminModules extends Model
protected $type = [
'id' => 'integer',
'mid' => 'integer',
'name' => 'string',
'code' => 'string',
'path' => 'string',
@@ -9,7 +9,7 @@
// | Author: Liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace app\model;
namespace app\model\Cms;
use think\Model;
use think\model\concern\SoftDelete;
@@ -36,6 +36,7 @@ class Articles extends Model
// 字段类型转换
protected $type = [
'id' => 'integer',
'tid' => 'integer',
'cate' => 'integer',
'sort' => 'integer',
'status' => 'integer',
@@ -9,7 +9,7 @@
// | Author: Liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace app\model;
namespace app\model\Cms;
use think\Model;
use think\model\concern\SoftDelete;
@@ -36,6 +36,11 @@ class ArticlesCategory extends Model
// 字段类型转换
protected $type = [
'id' => 'integer',
'cid' => 'integer',
'tid' => 'integer',
'name' => 'string',
'image' => 'string',
'desc' => 'string',
'sort' => 'integer',
'status' => 'integer',
'create_time' => 'datetime',
+2
View File
@@ -30,9 +30,11 @@ class Tenant extends Model
'contact_phone' => 'string',
'contact_email' => 'string',
'address' => 'string',
'domain' => 'string',
'status' => 'integer',
'create_time' => 'datetime',
'update_time' => 'datetime',
'delete_time' => 'datetime',
'remark' => 'string',
];
}