You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
50 lines
1.1 KiB
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Request\v3;
|
|
|
|
use App\Request\BaseFormRequest;
|
|
|
|
class OrderOnlineRequest extends BaseFormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'market_id' => 'required|nonempty|integer',
|
|
'user_id' => 'required|nonempty|integer',
|
|
'user_address_id' => 'required|nonempty|integer',
|
|
'store_list' => 'required|nonempty|json_keys:store_id,note,cart_ids',
|
|
'delivery_time_note' => 'required|nonempty',
|
|
'total_money' => 'required|nonempty',
|
|
'coupon_ids' => 'nonempty',
|
|
'service_money' => 'nonempty|numeric',
|
|
'plat' => 'nonempty',
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'*.*' => ':attribute 参数异常'
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
|
|
];
|
|
}
|
|
}
|