allocatr/application/worker/validate/OrderDispatch.php
2025-04-19 21:40:42 +08:00

36 lines
1.2 KiB
PHP

<?php
namespace app\worker\validate;
use think\Validate;
class OrderDispatch extends Validate
{
protected $rule = [
'type|确认类型' => 'require|in:accept,reject',
'order_dispatch_id|订单派单id' => 'require|number',
'workbench_type|工作台类型' => 'require|in:ongoing,today,tomorrow,all',
'plan_time|预约时间' => 'require|date',
'images|上门图片' => 'require|max:3000',
'complete_images|完成图片' => 'require|max:3000',
'final_payment_method|收款方式' => 'require|in:1,2',
'amount|收款金额' => 'require|number|between:0,10000000',
'payment_image|收款图片' => 'require|max:255',
'offline_total_type|尾款收款方' => 'in:1,2',
];
protected $message = [
];
protected $scene = [
'orderConfirm' => ['type', 'order_dispatch_id'],
'workbenchOrderList' => ['workbench_type'],
'info' => ['order_dispatch_id'],
'appointmentTime' => ['order_dispatch_id', 'plan_time'],
'arrivedOnSite' => ['order_dispatch_id', 'images'],
'completeService' => ['order_dispatch_id', 'complete_images', 'offline_total_type', 'amount', 'payment_image', 'offline_total_type'],
];
}