<?php
class pinche_orderModel extends model{
	public $table="mod_pinche_order";
	public function __construct(){
		parent::__construct();
	}
	public function statusList(){
		return array(
			0=>"待成团",
			1=>"已成团",
			2=>"已上车",
			3=>"已完成",
			4=>"已取消"
		);
	}
	public function Dselect($ops=array(),&$rscount=false){
		$res=$this->select($ops);
		if($res){
			$statusList=$this->statusList();
			foreach($res as $rs){
				$lids[]=$rs["lineid"];
			}
			$lines=MM("pinche","pinche_line")->getListByIds($lids);
			foreach($res as $k=>$v){
				$v["line_title"]=$lines[$v["lineid"]]["title"];
				$v["status_name"]=$statusList[$v["status"]];
				$list[$k]=$v;
			}
		}
		return $list;
	} 
	
}