Browse Source
Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix
master
Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix
master
8 changed files with 106 additions and 102 deletions
-
14app/Controller/v3/CouponController.php
-
2app/Controller/v3/GoodsController.php
-
3app/Controller/v3/UserAddressController.php
-
53app/Request/v3/UserAddressUpdateRequest.php
-
2app/Service/v3/Implementations/CollectStoreService.php
-
110app/Service/v3/Implementations/CouponRecService.php
-
20app/Service/v3/Implementations/UserCenterBlockService.php
-
4app/Service/v3/Interfaces/CouponRecServiceInterface.php
@ -0,0 +1,53 @@ |
|||||
|
<?php |
||||
|
|
||||
|
declare(strict_types=1); |
||||
|
|
||||
|
namespace App\Request\v3; |
||||
|
|
||||
|
use App\Request\BaseFormRequest; |
||||
|
|
||||
|
class UserAddressUpdateRequest extends BaseFormRequest |
||||
|
{ |
||||
|
|
||||
|
/** |
||||
|
* Get the validation rules that apply to the request. |
||||
|
*/ |
||||
|
public function rules(): array |
||||
|
{ |
||||
|
return [ |
||||
|
'user_id' => 'required|nonempty|integer', |
||||
|
'user_name' => 'required|nonempty', |
||||
|
'address' => 'required|nonempty', |
||||
|
'doorplate' => 'required|nonempty', |
||||
|
'gender' => 'required|nonempty|integer|between:1,2', |
||||
|
'lat' => 'required|nonempty', |
||||
|
'lng' => 'required|nonempty', |
||||
|
'tel' => 'required|nonempty' |
||||
|
]; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function messages(): array |
||||
|
{ |
||||
|
return [ |
||||
|
'user_id.*' => ':attribute无效', |
||||
|
'gender.*' => ':attribute无效', |
||||
|
]; |
||||
|
} |
||||
|
|
||||
|
public function attributes(): array |
||||
|
{ |
||||
|
return [ |
||||
|
'user_id' => '用户id', |
||||
|
'user_name' => '用户名', |
||||
|
'address' => '地址', |
||||
|
'doorplate' => '门牌号', |
||||
|
'gender' => '性别', |
||||
|
'lat' => '纬度', |
||||
|
'lng' => '经度', |
||||
|
'tel' => '电话', |
||||
|
]; |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue