first commit

This commit is contained in:
Your Name
2026-01-19 14:19:22 +08:00
commit fe2d9c1868
4777 changed files with 665503 additions and 0 deletions

View File

@@ -0,0 +1,114 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\validate\item;
use app\common\validate\BaseValidate;
/**
* 项目验证器
* Class ItemValidate
* @package app\adminapi\validate\item
*/
class ItemValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'cid' => 'require',
'type' => 'require',
'title' => 'require',
'min_money' => 'require',
'max_money' => 'require',
'rate' => 'require',
'cycle' => 'require',
'progress' => 'require',
'progress_auto' => 'require',
'is_show' => 'require',
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'cid' => '项目分类',
'type' => '投资类型',
'title' => '项目标题',
'min_money' => '最小投资额',
'max_money' => '最大投资额',
'rate' => '利率',
'cycle' => '周期',
'progress' => '项目进度',
'progress_auto' => '自增进度',
'is_show' => '是否显示',
];
/**
* @notes 添加场景
* @return ItemValidate
* @author BD
* @date 2024/01/16 13:23
*/
public function sceneAdd()
{
return $this->only(['cid','type','title','min_money','max_money','rate','cycle','progress','progress_auto','is_show']);
}
/**
* @notes 编辑场景
* @return ItemValidate
* @author BD
* @date 2024/01/16 13:23
*/
public function sceneEdit()
{
return $this->only(['id','cid','type','title','min_money','max_money','rate','cycle','progress','progress_auto','is_show']);
}
/**
* @notes 删除场景
* @return ItemValidate
* @author BD
* @date 2024/01/16 13:23
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return ItemValidate
* @author BD
* @date 2024/01/16 13:23
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}