<?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_Car extends Mdl_Table
{   
  
    protected $_table = 'xiche_car';
    protected $_pk = 'car_id';
    protected $_cols = 'car_id,uid,brand_id,paizhao_sf,paizhao_hao,photo,color,dateline';

    protected function _format_row($row)
    {
        static $brand_list = null;
        if($brand_list === null){
            $brand_list = K::M('xiche/car/brand')->fetch_all();
        }
        $row['brand_name'] = $brand_list[$row['brand_id']]['title'];
        $row['paizhao'] = $row['paizhao_sf'].$row['paizhao_hao'];
        return $row;
    }
}