<?php
/**
 * Copy Right IJH.CC
 * Each engineer has a duty to keep the code elegant
 * $Id: order.mdl.php 6303 2014-09-17 11:01:41Z youyi $
 */

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

class Mdl_Trade_Order extends Model
{   


    protected $_order_mdl = array('xiche'=>'xiche/order', 'chongwu'=>'chongwu/model', 'meirong'=>'meirong/order', 'jiazheng'=>'jz/order');

    public function loadmodel($from)
    {
        if($mdl = $this->_order_mdl[$from]){
            return K::M($mdl);
        }
        return false;
    }

    public function set_payed($from, $order_id)
    {
        return $this->loadmodel($from)->set_payed($order_id);
    }

    public function set_finished($from, $order_id)
    {
        return $this->loadmodel($from)->set_finished($order_id);
    }

    public function order($from, $order_id)
    {
        return $this->loadmodel($from)->detail($order_id);
    }
}