123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace app\model;
- use support\Model;
- class SysUser extends Model
- {
- protected $table = 'sys_user';
- protected $primaryKey = 'user_id';
- public const UPDATED_AT = null;
- protected $keyType = 'string';
- /* 按登录名查找用户 */
- public static function findByLoginName($name)
- {
- return self::where('user_login_name', $name)->first();
- }
- /**
- * @Desc 修改用户状态
- * @Author Gorden
- * @Date 2024/3/12 13:20
- *
- * @param $id
- * @param $data
- * @return int
- */
- public static function updateStatus($id, $data)
- {
- return self::where('user_id', $id)->update($data);
- }
- }
|