<?php
/**
 * Copy Right IJH.CC
 * Each engineer has a duty to keep the code elegant
 * $Id$
 */

if(!defined('__CORE_DIR')){
    exit("Access Denied");
}

class Mdl_Order_Log extends Mdl_Table
{   
  
    protected $_table = 'order_log';
    protected $_pk = 'id';
    protected $_cols = 'order_id,tips,money,dateline';
    

    
     public function create($data)
    {


         
        if(!$order_id = $data['order_id']){
            return false;
        }else if(!$tips = $data['tips']){
            return false;
        }
        
        $money = $data['money'];
        
        $a = array('order_id'=>$order_id, 'tips'=>$tips,'money'=>$money,'dateline'=>time());    

    	if(!$o = $this->insert($a, true)){

    		return false;
    	}
        
        return $o;
    }
    
    
    
     public function insert($data)
    {

        if($uid = $this->db->insert($this->_table, $data, true)){
            return $uid;
        }
        
    }
    
      
    

    
    
}