<?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_Xiche_Order extends Mdl_Table
{   
  
    protected $_table = 'xiche_order';
    protected $_pk = 'order_id';
    protected $_cols = 'order_id,goods_id,uid,staff_id,contact,mobile,order_status,pay_status,pay_time,yuyue_time,fuwu_time,price,bonus_id,bonus_price,discount_price,discount_info,amount,addr,lat,lng,clientip,dateline';
    
    
    public function create($data)
    {
 

    	if(!$o = $this->insert($data, true)){
    		return false;
    	}

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

        $data['dateline'] = $data['dateline'] ? $data['dateline'] :  __CFG::TIME;
        if($uid = $this->db->insert($this->_table, $data, true)){
            //$this->db->Execute("INSERT INTO ".$this->table('member_fields')."(uid) VALUES('$uid')");
            return $uid;
        }
        
    }
    
    

    
    
}