'require', 'real_name' => 'require', 'nickname' => 'require', 'account' => 'require', 'password' => 'require', 'mobile' => 'require|mobile', 'is_disable' => 'in:0,1', 'sex' => 'in:1,2', 'province' => 'require', 'city' => 'require', 'area' => 'require', 'street' => 'require', 'village' => 'require', 'brigade' => 'require', 'user_ship' => 'require', ]; /** * 参数描述 * @var string[] */ protected $field = [ 'id' => 'id', 'real_name' => '真实姓名', 'nickname' => '用户昵称', 'account' => '用户账号', 'password' => '用户密码', 'mobile' => '用户电话', 'is_disable' => '是否禁用', 'sex' => '用户性别', 'province' => '省', 'city' => '市', 'area' => '区', 'street' => '街道', 'village' => '村', 'brigade' => ' 队', 'user_ship' => ' 会员类型', ]; /** * @notes 添加场景 * @return UserValidate * @author likeadmin * @date 2024/04/25 10:20 */ public function sceneAdd() { return $this->remove('id',true); } public function scenestoreAdd() { return $this->only(['mobile','province','city','district','street','village','brigade','user_ship']); } /** * @notes 编辑场景 * @return UserValidate * @author likeadmin * @date 2024/04/25 10:20 */ public function sceneEdit() { return $this->only(['id','avatar','real_name','nickname','account','password','mobile','is_disable','sex'])->remove('password','require'); } /** * @notes 删除场景 * @return UserValidate * @author likeadmin * @date 2024/04/25 10:20 */ public function sceneDelete() { return $this->only(['id']); } /** * @notes 详情场景 * @return UserValidate * @author likeadmin * @date 2024/04/25 10:20 */ public function sceneDetail() { return $this->only(['id']); } }