| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace app\index\model;
- use think\Model;
- /**
- * 工单报警模型
- */
- class Alarm extends Model
- {
- /**
- * 获取工单报警
- *
- * @access public
- * @param mixed $field 查询字段
- * @param mixed $where 条件
- * @return array 返回类型
- */
- public function findAlarm($field, $where)
- {
- $result = $this->field($field)->where($where)->find();
- return $result;
- }//end findAlarm()
- /**
- * 新增工单报警
- *
- * @access public
- * @param mixed $data 数据
- * @return array 返回类型
- */
- public function addAlarm($data)
- {
- $result = $this->insert($data);
- return $result;
- }//end addAlarm()
- /**
- * 修改工单报警
- *
- * @access public
- * @param mixed $where 条件
- * @param mixed $data 数据
- * @return array 返回类型
- */
- public function updateAlarm($where, $data)
- {
- $result = $this->where($where)->update($data);
- return $result;
- }//end updateAlarm()
- }
|