表名同步

This commit is contained in:
wong
2025-04-12 18:31:53 +08:00
parent 192701e41e
commit 8d96110767
12 changed files with 174 additions and 128 deletions

View File

@@ -133,7 +133,7 @@ class Device extends Controller
$order = Request::param('order', 'desc');
// 添加公司ID过滤条件
$where['d.companyId'] = $userInfo['companyId'];
$where['d.tenantId'] = $userInfo['companyId'];
// 根据用户管理员状态调整查询条件
if ($userInfo['isAdmin'] == 1) {

View File

@@ -10,7 +10,7 @@ use think\Db;
class Device extends Model
{
// 设置表名
protected $name = 'device';
protected $table = 's2_device';
/**
* 获取设备总数

View File

@@ -10,8 +10,9 @@ use think\model\concern\SoftDelete;
*/
class Workbench extends Model
{
protected $table = 'ck_workbench';
protected $pk = 'id';
protected $name = 'workbenches';
// 自动写入时间戳
protected $autoWriteTimestamp = true;

View File

@@ -9,6 +9,7 @@ use think\Model;
*/
class WorkbenchAutoLike extends Model
{
protected $table = 'ck_workbench_auto_like';
protected $pk = 'id';
protected $name = 'workbench_auto_like';

View File

@@ -6,6 +6,7 @@ use think\Model;
class WorkbenchGroupCreate extends Model
{
protected $table = 'ck_workbench_group_create';
protected $pk = 'id';
protected $name = 'workbench_group_create';

View File

@@ -6,6 +6,7 @@ use think\Model;
class WorkbenchGroupPush extends Model
{
protected $table = 'ck_workbench_group_push';
protected $pk = 'id';
protected $name = 'workbench_group_push';

View File

@@ -6,6 +6,7 @@ use think\Model;
class WorkbenchMomentsSync extends Model
{
protected $table = 'ck_workbench_moments_sync';
protected $pk = 'id';
protected $name = 'workbench_moments_sync';