<?php

namespace app\admin\validate\order;

use support\Validate;

class OrderValidate extends Validate
{
    /**
     * 规则
     * @var string[]
     */
    protected $rule = [
        'order_id' => 'require|alphaDash',
        'join_order_member_id' => 'require|alphaDash',
        'order_name|订单名称' => 'max:32',
        'order_status_system|订单系统状态' => 'require|max:32',
        'order_status_payment|订单支付状态' => 'require|max:32',
        'order_status_storage|订单库存状态' => 'require|max:32',
    ];

    /**
     * 场景
     * @var array[]
     */
    protected $scene = [
        'add' => ['join_order_member_id', 'order_name', 'order_status_system', 'order_status_payment', 'order_status_storage'],
        'update' => ['order_id', 'join_order_member_id', 'order_name', 'order_status_system', 'order_status_payment', 'order_status_storage'],
    ];
}