File: /web/data/weixin.tbbbearing.com/App/Manage/Model/ThirdCodeModel.class.php
<?php
/**
* Created by PhpStorm.
* User: 18613127572
* Date: 2018/1/30
* Time: 13:33
*/
namespace Manage\Model;
use Think\Model;
class ThirdCodeModel extends Model{
public function get_all($where='1'){
return $this->where($where)->order('add_time asc')->select();
}
public function get_one($where){
return $this->where($where)->find();
}
public function add_one($data=array()){
if(!$data)
return false;
$this->add($data);
return true;
}
public function update_one($where='',$data=''){
$this->where($where)->save($data);
}
public function remove_one($where=''){
$row = $this->get_one($where);
$this->where($where)->delete();
return $row;
}
}