chore: 重写初始提交(清空历史,整理后全量提交)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
namespace app\backend\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Ad extends Validate
|
||||
{
|
||||
protected $rule = [
|
||||
'title' => 'require|max:200',
|
||||
'type' => 'in:1,2,3',
|
||||
'position' => 'in:home_top,home_side,popup,list_bottom,home_bottom,content_top,content_bottom,sidebar,float',
|
||||
'content' => 'require',
|
||||
'url' => 'max:255',
|
||||
'image' => 'max:255',
|
||||
'sort' => 'number',
|
||||
'status' => 'in:0,1',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'add' => ['title', 'type', 'position', 'content', 'url', 'image', 'sort', 'status'],
|
||||
'edit' => ['title', 'type', 'position', 'content', 'url', 'image', 'sort', 'status'],
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user