<?php
 
class Order extends AppModel
{
    var $name='Order';



    function list($conditions = array(), $order = 'id desc' )
    {
        return $this->find('all', array(
            'conditions' => $conditions,
            'order' => $order,
        ));
    }

    function add($inputData)
    {
        $result = false;

        if(!empty($inputData))
        {
            $fileds = array();
            $dbData["Order"] = $inputData;
            if($this->save($dbData,false,$fileds)){
                $dbData["Order"]['id'] = $this->id;
                $result = true;
            }
        }
        return array($result,$dbData["Order"]);
    }

    


}
?>