代码优化

This commit is contained in:
wong
2025-04-12 15:08:21 +08:00
parent 568de908e2
commit 9257716d9b
49 changed files with 1001 additions and 603 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace app\cunkebao\model;
use think\Model;
/**
* 用户模型
*/
class User extends Model
{
protected $pk = 'id';
protected $name = 'users';
// 自动写入时间戳
protected $autoWriteTimestamp = true;
protected $createTime = 'createTime';
protected $updateTime = 'updateTime';
// 定义关联的工作台
public function workbench()
{
return $this->hasMany('Workbench', 'id', 'userId');
}
}