多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
需要添加索引的 /* 添加索引 */ $connection = new \MongoClient(); $collection = $connection->database->user_housing; $state = $collection->ensureIndex(array("user_id"=>1));//创建一个在‘i’上升序的索引 /* 添加索引 */ $connection = new \MongoClient(); $collection = $connection->database->housing; $state = $collection->ensureIndex(array("name"=>1));//创建一个在‘i’上升序的索引 ## 集合名称:metro。 地铁线路 > 说明:区域ID的读取mysql数据库的 +++ <<< success { "_id" : ObjectId("589afbdeb15c802c22000032"), "name" : "1号线", //地铁站名称 "city_id" : "1", //区域ID "station" : { //站点 "0" : { "name" : "民治", //站点名称 "map_lat" : "22.680503", //百度地图经纬度 "map_lng" : "113.840978", //百度地图经纬度 "_id" : "14865520534059" //站点ID(用于盘源关联站点) } } } +++ ## 集合名称:company。 单位名称 > 说明:区域ID的读取mysql数据库的 +++ <<< success { "_id" : ObjectId("589b11c0b15c800c15000029"), "type" : "price_units", //单位类型。如:price_units 表示价格单位 "name" : "非中央空调" //单位名称 } +++ ## 集合名称:housing。 房源信息 > +++ <<< success { "_id" : ObjectId("58a3f6bfa81e5a312913ee8d"), "name" : "北科大厦", //盘源名称 该这段添加索引 "city_id" : "1", 市区ID 该这段添加索引 "district_id" : "3", 行政区ID 该这段添加索引 "phone" : "15507898841", //咨询热线 "lease_price" : "58", //出租价格 "lease_price_company" : //出租价格单位ID "58a3c720a81e5a701b13ee8d", "sell_price" : "222", //出售价格 "sell_price_company" : //出售价格ID "58a3c730a81e5a823413ee8d", "file" : [ //展示图 "shenFengZheng/2017021514342614871404669281.jpg", "shenFengZheng/2017021514342814871404682228.jpg", "shenFengZheng/2017021514343414871404747946.jpg" ], "total_area" : "10000", //总建筑面积 "average_area" : "300", //每层面积 "renovation_id" : "58a3c987a81e5aca1e13ee8d", //装修类型ID "building_num" : "1", //栋座数量 "floor_height" : "3.8", //平均每层高度 "elevator_num" : "5", //电梯数量 "greening_rate" : "12", //绿化率 "label" : [ //特色标签 "58a3cc4ea81e5a212013ee8d" ], "property_name" : "物业公司名称", //物业公司名称 "property_fee" : "133", //物业费 "property_fee_company" : //物业费ID "58a3c720a81e5a701b13ee8d", "parking_num" : "122", //车位数量 "project_name" : "项目名称", //项目名称 "developers" : "开发商", //开发商 "developers_briefing" : "开发商简介\r\n", //开发商简介 "property_term" : "70", //产权期限 "address" : "发反反复复付发反反复复付", //地址 "map_lng" : "113.854633", //百度地图经度 该这段添加索引 "map_lat" : "22.60552", //百度地图纬度 该这段添加索引 "Building" : { //栋座 "0" : { "building_code" : "1", //栋座编号 "total_floor" : "20", //总层数 "layer_area" : "300", //每层总面积 "_id" : //栋座ID "58a3f6bfa81e5a312913ee8d14871405656747", "floor" : { //楼层 "58a3f6bfa81e5a312913ee8d14871406724156" : { //楼层ID "source_id" : "58a3f6bfa81e5a312913ee8d", //盘源ID "room_title" : "1319", //户型标题 "building_id" : //栋座 "58a3f6bfa81e5a312913ee8d14871405656747", "floor" : "13", //楼层 "doorplate" : "1319", //门牌号 "type" : "1", //意向:1为出租。2为出售 "area" : "102", //面积 "price" : "58", //价格 "room_price_id" : //价格单位 "58a3c720a81e5a701b13ee8d", "renovation_id" : "", //装修类型 "action" : [ //空间功能 "58a3ce8ca81e5aa22013ee8d", "58a3ce94a81e5ac82313ee8d", "58a3ce9da81e5acb2313ee8d" ], "ground_type_bet" : "1", //付款方式(押) "ground_type_pay" : "1", //付款方式(付) "payment_type" : "1", //可提供佣金 "payment_type_company" : "1", //可提供押金单位(1为以每个月租金为单位,2为元) "vacant" : "1", //是否空置,0为否,1为是 "vacant_time" : "4", //空置时间 "matching" : [ //空间配套 "58a3c9a6a81e5a561f13ee8d", "58a3c9afa81e5a3a1e13ee8d" ], "property" : "产权", //产权 "con_name" : "联系人", //联系人 "con_tel" : "15507898841", //联系方式 "evaluate" : "经纪人点评\r\n", 经纪人点评 "toomImg" : [ //户型图 "shenFengZheng/2017021514372714871406473295.jpg", "shenFengZheng/2017021514373014871406502209.jpg", "shenFengZheng/2017021514373614871406567344.jpg" ], "first" : [ //照片信息图 "shenFengZheng/2017021514373914871406591552.jpg", "shenFengZheng/2017021514374314871406633652.jpg", "shenFengZheng/2017021514374714871406678135.jpg" ], "_id" : //户型ID "58a3f6bfa81e5a312913ee8d14871406724156" } } } } } +++ ## 集合名称:room。 户型 > +++ <<< success "room_id" : "58aa9c58b15c80682f00002914875979421751", //在房源库中的户型ID "source_id" : "58a3f6bfa81e5a312913ee8d", //盘源ID "room_title" : "1319", //户型标题 "building_id" : //栋座 "58a3f6bfa81e5a312913ee8d14871405656747", "floor" : "13", //楼层 "doorplate" : "1319", //门牌号 "type" : "1", //意向:1为出租。2为出售 "area" : "102", //面积 "price" : "58", //价格 "room_price_id" : //价格单位 "58a3c720a81e5a701b13ee8d", "renovation_id" : "", //装修类型 "action" : [ //空间功能 "58a3ce8ca81e5aa22013ee8d", "58a3ce94a81e5ac82313ee8d", "58a3ce9da81e5acb2313ee8d" ], "ground_type_bet" : "1", //付款方式(押) "ground_type_pay" : "1", //付款方式(付) "payment_type" : "1", //可提供佣金 "payment_type_company" : "1", //可提供押金单位(1为以每个月租金为单位,2为元) "vacant" : "1", //是否空置,0为否,1为是 "vacant_time" : "4", //空置时间 "matching" : [ //空间配套 "58a3c9a6a81e5a561f13ee8d", "58a3c9afa81e5a3a1e13ee8d" ], "property" : "产权", //产权 "con_name" : "联系人", //联系人 "con_tel" : "15507898841", //联系方式 "evaluate" : "经纪人点评\r\n", 经纪人点评 "toomImg" : [ //户型图 "shenFengZheng/2017021514372714871406473295.jpg", "shenFengZheng/2017021514373014871406502209.jpg", "shenFengZheng/2017021514373614871406567344.jpg" ], "first" : [ //照片信息图 "shenFengZheng/2017021514373914871406591552.jpg", "shenFengZheng/2017021514374314871406633652.jpg", "shenFengZheng/2017021514374714871406678135.jpg" ], +++ ## 集合名称:resources。 淘资源 > +++ <<< success { "_id" : ObjectId("58ae8345b15c80ac25000029"), "title" : "资源标题", "con_tel" : "15512345678", "con_name" : "业主姓名", "city_id" : "1", //区域ID "small_area" : "58", //所需最小面积 "large_area" : "120", //所需最大面积 "region" : "龙华新区民治街道办", //委托区域 "price" : "5888", //价格上限 "company_name" : "小马快租", //公司名称 "industry" : "房地产", //公司行业 "settled_time" : "1", //是否立即入驻 1为是0为否 "describe" : "小马快租找龙华新区民治街道办办公室" //描述 } +++