<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * zsb
 *
 * 业务类库
 *
 * @package         zsb
 * @author          EllisLab Dev Team
 * @copyright       Copyright (c) 2006 - 2014, HOUSE365, Inc.
 * @link            http://nj.sell.house.com
 * @since           Version 1.0
 * @filesource
 */

// ------------------------------------------------------------------------
/**
 * 意见反馈类
 *
 * 意见反馈类文件功能描述
 *
 * @package         zsb
 * @subpackage      Models
 * @category        Models
 */
class Feedback_base_model extends MY_Model 
{ 
    /**
     * 意见反馈
     * @var string 
     */
    private $_feedback_tbl = 'mobile_feedback';
    
    
    
    /**
     * 查询字段
     * @var string 
     */
    public $select_fields = '';
    
    /**
     * 设置需要查询的字段
     * @param array $select_fields
     */
    public function set_select_fields($select_fields)
    {
        $select_fields_str = '';
        if(isset( $select_fields ) && !empty($select_fields))
        {   
            $select_fields_str = implode( ',', $select_fields) ;
        }
        $this->select_fields = $select_fields;
    }
    
    /**
     * 获取需要查询的字段
     * @return string
     */
    public function get_select_fields()
    {
        return $this->select_fields;
    }
    
   /**
    * 类初始化
    */
    public function __construct()
    {
        parent::__construct(1,1,2);
    }
  
    
    /**
     * 插入意见反馈
     * @param array $insert_data 插入数据源数组
     * @return int 成功 返回插入成功后的意见反馈id 失败 false
     */
    public function insert($insert_data)
    {

		if ($this->db->insert($this->_feedback_tbl, $insert_data))
		{
			return $this->db->insert_id();
		}
        return false;
    }
}