multi-store/app/admin/validate/ActivityZoneValidate.php

86 lines
1.5 KiB
PHP

<?php
namespace app\admin\validate;
use app\common\validate\BaseValidate;
/**
* ActivityZone验证器
* Class ActivityZoneValidate
* @package app\admin\validate
*/
class ActivityZoneValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'form_id' => 'require',
'product_ids' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'form_id' => '表单',
'product_ids' => '商品',
];
/**
* @notes 添加场景
* @return ActivityZoneValidate
* @author admin
* @date 2024/12/20 10:52
*/
public function sceneAdd()
{
return $this->only(['form_id', 'product_ids']);
}
/**
* @notes 编辑场景
* @return ActivityZoneValidate
* @author admin
* @date 2024/12/20 10:52
*/
public function sceneEdit()
{
return $this->only(['id', 'form_id', 'product_ids']);
}
/**
* @notes 删除场景
* @return ActivityZoneValidate
* @author admin
* @date 2024/12/20 10:52
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return ActivityZoneValidate
* @author admin
* @date 2024/12/20 10:52
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}