add
This commit is contained in:
29
app/api/validate/CourseCollectValidate.php
Normal file
29
app/api/validate/CourseCollectValidate.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class CourseCollectValidate extends Validate
|
||||
{
|
||||
protected $failException = true;
|
||||
|
||||
protected $rule = [
|
||||
'classify' => 'require',
|
||||
// 'courseDetailsId' => 'require',
|
||||
'courseId' => 'require',
|
||||
'type' => 'require',
|
||||
];
|
||||
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'insertCourseCollect' => ['classify', 'courseId', 'type']
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user