multi-store/app/admin/validate/financial_transfers/FinancialTransfersValidate.php
2024-06-14 15:34:50 +08:00

108 lines
2.0 KiB
PHP

<?php
namespace app\admin\validate\financial_transfers;
use app\common\validate\BaseValidate;
/**
* FinancialTransfers验证器
* Class FinancialTransfersValidate
* @package app\admin\validate\financial_transfers
*/
class FinancialTransfersValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'store_id' => 'require',
'money' => 'require',
'status' => 'require|number',
'transfer_picture' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'store_id' => '店铺id',
'money' => '金额',
'status' => '状态',
'transfer_picture' => '财务上传凭证',
];
public function sceneSend()
{
return $this->only(['id']);
}
public function sceneConfirm()
{
return $this->only(['id','status']);
}
public function sceneSuccess()
{
return $this->only(['id','transfer_picture','status']);
}
/**
* @notes 添加场景
* @return FinancialTransfersValidate
* @author admin
* @date 2024/06/14 10:10
*/
public function sceneAdd()
{
return $this->only(['store_id','money']);
}
/**
* @notes 编辑场景
* @return FinancialTransfersValidate
* @author admin
* @date 2024/06/14 10:10
*/
public function sceneEdit()
{
return $this->only(['id','store_id','money']);
}
/**
* @notes 删除场景
* @return FinancialTransfersValidate
* @author admin
* @date 2024/06/14 10:10
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return FinancialTransfersValidate
* @author admin
* @date 2024/06/14 10:10
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}