public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(array('biz_id, name, service_tel', 'required'), array('address, travel_info, open_time,lnglat', 'required', 'on' => 'sell'), array('is_reservation', 'numerical', 'integerOnly' => true), array('biz_id, province_id, city_id, area_id, cbd_id, create_time, update_time', 'length', 'max' => 10), array('name, service_tel', 'length', 'max' => 128), array('address, travel_info, open_time', 'length', 'max' => 255), array('lnglat', 'length', 'max' => 64), array('id, biz_id, name, service_tel, address, travel_info, open_time, province_id, city_id, area_id, cbd_id, lnglat, is_reservation, create_time, update_time', 'safe', 'on' => 'search'));
}