2024-01-09 15:59:23 +08:00
|
|
|
|
<?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\device;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use app\common\validate\BaseValidate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MonitorThreshold验证器
|
|
|
|
|
* Class MonitorThresholdValidate
|
|
|
|
|
* @package app\adminapi\validate\device
|
|
|
|
|
*/
|
|
|
|
|
class MonitorThresholdValidate extends BaseValidate
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 设置校验规则
|
|
|
|
|
* @var string[]
|
|
|
|
|
*/
|
|
|
|
|
protected $rule = [
|
2024-01-13 14:20:38 +08:00
|
|
|
|
|
2024-01-09 15:59:23 +08:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 参数描述
|
|
|
|
|
* @var string[]
|
|
|
|
|
*/
|
2024-01-13 14:20:38 +08:00
|
|
|
|
protected $field = [];
|
2024-01-09 15:59:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @notes 添加场景
|
|
|
|
|
* @return MonitorThresholdValidate
|
|
|
|
|
* @author likeadmin
|
|
|
|
|
* @date 2023/11/24 16:17
|
|
|
|
|
*/
|
|
|
|
|
public function sceneAdd()
|
|
|
|
|
{
|
|
|
|
|
return $this->only(['soil_temp_max','soil_temp_min','soil_mois_max','soil_mois_min','soil_ph_max','soil_ph_min','soil_n_content_max','soil_n_content_min','soil_p_content_max','soil_p_content_min','soil_k_content_max','soil_k_content_min','air_temp_max','air_temp_min','air_mois_max','air_mois_min','air_co2_content_max','air_co2_content_min','wind_speed_max','wind_speed_min']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @notes 编辑场景
|
|
|
|
|
* @return MonitorThresholdValidate
|
|
|
|
|
* @author likeadmin
|
|
|
|
|
* @date 2023/11/24 16:17
|
|
|
|
|
*/
|
|
|
|
|
public function sceneEdit()
|
|
|
|
|
{
|
|
|
|
|
return $this->only(['id','soil_temp_max','soil_temp_min','soil_mois_max','soil_mois_min','soil_ph_max','soil_ph_min','soil_n_content_max','soil_n_content_min','soil_p_content_max','soil_p_content_min','soil_k_content_max','soil_k_content_min','air_temp_max','air_temp_min','air_mois_max','air_mois_min','air_co2_content_max','air_co2_content_min','wind_speed_max','wind_speed_min']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @notes 删除场景
|
|
|
|
|
* @return MonitorThresholdValidate
|
|
|
|
|
* @author likeadmin
|
|
|
|
|
* @date 2023/11/24 16:17
|
|
|
|
|
*/
|
|
|
|
|
public function sceneDelete()
|
|
|
|
|
{
|
|
|
|
|
return $this->only(['id']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @notes 详情场景
|
|
|
|
|
* @return MonitorThresholdValidate
|
|
|
|
|
* @author likeadmin
|
|
|
|
|
* @date 2023/11/24 16:17
|
|
|
|
|
*/
|
|
|
|
|
public function sceneDetail()
|
|
|
|
|
{
|
|
|
|
|
return $this->only(['id']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|