Files
useds/app/common/service/UserService.php
T

40 lines
720 B
PHP

<?php
namespace app\common\service;
use app\common\validate\UserValidate;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\User;
use support\Request;
class UserService
{
use CrudServiceTrait;
/**
* 指定当前要操作的模型
*/
protected string $modelClass = User::class;
/**
* 验证器
*/
protected $validator = UserValidate::class;
/**
* 获取验证器
*/
public function getValidator()
{
return new $this->validator;
}
public function beforeServiceUpdate($data, Request $request){
unset($data['union_id']);
unset($data['app_id']);
unset($data['name']);
return $data;
}
}