multi-store/app/admin/validate/purchase_order/PurchaseOrderValidate.php

86 lines
1.5 KiB
PHP

<?php
namespace app\admin\validate\purchase_order;
use app\common\validate\BaseValidate;
/**
* 采购订单验证器
* Class PurchaseOrderValidate
* @package app\admin\validate\purchase_order
*/
class PurchaseOrderValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'store_id' => 'require',
'order_id' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'store_id' => '所属商户',
'order_id' => '单据编号',
];
/**
* @notes 添加场景
* @return PurchaseOrderValidate
* @author admin
* @date 2024/08/01 16:32
*/
public function sceneAdd()
{
return $this->only(['store_id','order_id']);
}
/**
* @notes 编辑场景
* @return PurchaseOrderValidate
* @author admin
* @date 2024/08/01 16:32
*/
public function sceneEdit()
{
return $this->only(['id','store_id','order_id']);
}
/**
* @notes 删除场景
* @return PurchaseOrderValidate
* @author admin
* @date 2024/08/01 16:32
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return PurchaseOrderValidate
* @author admin
* @date 2024/08/01 16:32
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}