allocatr/application/worker/validate/OrderDispatch.php
2025-04-17 15:40:07 +08:00

29 lines
782 B
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',
'img|上门图片' => 'require|max:300',
];
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', 'img'],
];
}