<?php
class CarModel extends CarBase
{
	/**
	  * @method 查询1级车型信息
	  * @param  $fieldArr 需要查询的字段名称数组
	  * @param  $where 查询条件
	  * @param  $oneRow true|false
	  * @author soul
	  * @copyright 2016/3/30
	  * @return array(3) { ["status"]=> bool(true) ["data"]=> $OneRow=false 二维数组 ; $OneRow=true 一维数组["code"]=> int(0) } 
	  */
	public function getModel1($fieldArr, $where = '', $oneRow = false)
	{
		$table = 'model1
			LEFT JOIN brand ON m1_b_id = b_id
			LEFT JOIN manufacturer ON m1_maf_id = maf_id';
		return $this->get($table, $fieldArr, $where, $oneRow);
	}


	/**
	  * @method 查询2级车型信息
	  * @param  $fieldArr 需要查询的字段名称数组
	  * @param  $where 查询条件
	  * @param  $oneRow true|false
	  * @author soul
	  * @copyright 2016/3/30
	  * @return array(3) { ["status"]=> bool(true) ["data"]=> $OneRow=false 二维数组 ; $OneRow=true 一维数组["code"]=> int(0) } 
	  */
	public function getModel2($fieldArr, $where = '', $oneRow = false)
	{
		$table = 'model2
			LEFT JOIN model1 ON m2_m1_id = m1_id
			LEFT JOIN brand ON m2_b_id = b_id
			LEFT JOIN manufacturer ON m2_maf_id = maf_id';
		return $this->get($table, $fieldArr, $where, $oneRow);
	}
	
	/**
	  * @method 查询一级车型尺寸信息
	  * @param  $fieldArr 需要查询的字段名称数组
	  * @param  $where 查询条件
	  * @param  $oneRow true|false
	  * @author soul
	  * @copyright 2016/3/30
	  * @return array(3) { ["status"]=> bool(true) ["data"]=> $OneRow=false 二维数组 ; $OneRow=true 一维数组["code"]=> int(0) } 
	  */
	public function getModel1Size($fieldArr, $where = '', $oneRow = false)
	{
		$table = 'model1
			LEFT JOIN brand ON m1_b_id = b_id
			LEFT JOIN manufacturer ON m1_maf_id = maf_id
			LEFT JOIN model1_size ON m1_id = ms_m1_id';
		return $this->get($table, $fieldArr, $where, $oneRow);
	}
}