use dev_ln_scene;
// ================================================== 创建集合
db.createCollection("GoblinSelfGoodsCategoryVo");
db.createCollection("GoblinStoreGoodsCategoryVo");
db.createCollection("GoblinMgtCategorySpecVo");
db.createCollection("GoblinSelfTagVo");
db.createCollection("GoblinServiceSupportVo");
db.createCollection("GoblinStoreNoticeVo");
db.createCollection("GoblinStoreConfigVo");
db.createCollection("GoblinStoreInfoVo");
db.createCollection("GoblinGoodsInfoVo");
db.createCollection("GoblinGoodsSkuInfoVo");
db.createCollection("GoblinStoreCouponBasicVo");
db.createCollection("GoblinUserCouponVo");
db.createCollection("GoblinFrontBanner");
db.createCollection("GoblinFrontCube");
db.createCollection("GoblinFrontHotWord");
db.createCollection("GoblinFrontMoudleIndex");
db.createCollection("GoblinFrontNavigation");
db.createCollection("GoblinFrontSeckill");
db.createCollection("GoblinFrontSelectGoods");
db.createCollection("GoblinShoppingCartVoo");
db.createCollection("GoblinBackOrderVo");
db.createCollection("GoblinMailVo");
db.createCollection("GoblinMarketingZhengzaiRelationVo");
db.createCollection("GoblinOrderLogVo");
db.createCollection("GoblinOrderSkuVo");
db.createCollection("GoblinSelfMarketingVo");
db.createCollection("GoblinStoreOrderVo");
// ================================================== 创建分片
sh.enableSharding("dev_ln_scene");
sh.shardCollection("dev_ln_scene.GoblinSelfGoodsCategoryVo",{"cateId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinStoreGoodsCategoryVo",{"cateId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinMgtCategorySpecVo",{"cateId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinSelfTagVo",{"tagId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinServiceSupportVo",{"ssid":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinStoreNoticeVo",{"noticeId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinStoreConfigVo",{"storeId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinStoreInfoVo",{"storeId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinGoodsInfoVo",{"spuId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinGoodsSkuInfoVo",{"skuId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinStoreCouponBasicVo",{"storeCouponId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinUserCouponVo",{"ucouponId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinFrontBanner",{"bannerId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinFrontCube",{"cubeId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinFrontHotWord",{"hotWordId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinFrontMoudleIndex",{"moudleIndexId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinFrontNavigation",{"navigationId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinFrontSeckill",{"seckilId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinFrontSelectGoods",{"selectGoodsId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinShoppingCartVoo",{"goblinShoppingCartId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinBackOrderVo",{"backOrderId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinMailVo",{"mailId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinMarketingZhengzaiRelationVo",{"selfMarketId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinOrderLogVo",{"selfMarketId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinOrderSkuVo",{"selfMarketId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinStoreOrderVo",{"orderId":"hashed"});
sh.shardCollection("dev_ln_scene.GoblinSelfMarketingVo",{"selfMarketId":"hashed"});

// ================================================== 创建索引
db.GoblinSelfGoodsCategoryVo.createIndex({cateId:"hashed"});
db.GoblinStoreGoodsCategoryVo.createIndex({storeId:"hashed"});
db.GoblinMgtCategorySpecVo.createIndex({cateId:"hashed"});
db.GoblinSelfTagVo.createIndex({tagBelong:"hashed"});
db.GoblinServiceSupportVo.createIndex({ssid:"hashed"});
db.GoblinStoreNoticeVo.createIndex({storeId:"hashed"});
db.GoblinStoreConfigVo.createIndex({storeId:"hashed"});
db.GoblinStoreInfoVo.createIndex({storeId:"hashed"});
db.GoblinGoodsInfoVo.createIndex({spuId:"hashed"});
db.GoblinGoodsInfoVo.createIndex({storeId:"hashed"});
db.GoblinGoodsInfoVo.createIndex({spuNo:"hashed"});
db.GoblinGoodsSkuInfoVo.createIndex({skuId:"hashed"});
db.GoblinGoodsSkuInfoVo.createIndex({storeId:"hashed"});
db.GoblinStoreCouponBasicVo.createIndex({storeCouponId:"hashed"});
db.GoblinUserCouponVo.createIndex({uid:"hashed"});
db.GoblinFrontBanner.createIndex({bannerId:"hashed"});
db.GoblinFrontCube.createIndex({cubeId:"hashed"});
db.GoblinFrontHotWord.createIndex({hotWordId:"hashed"});
db.GoblinFrontMoudleIndex.createIndex({moudleIndexId:"hashed"});
db.GoblinFrontNavigation.createIndex({navigationId:"hashed"});
db.GoblinFrontSeckill.createIndex({seckilId:"hashed"});
db.GoblinFrontSelectGoods.createIndex({selectGoodsId:"hashed"});
db.GoblinShoppingCartVoo.createIndex({goblinShoppingCartId:"hashed"});
db.GoblinBackOrderVo.createIndex({backOrderId:"hashed"});
db.GoblinBackOrderVo.createIndex({orderId:"hashed"});
db.GoblinMailVo.createIndex({mailId:"hashed"});
db.GoblinMailVo.createIndex({orderId:"hashed"});
db.GoblinMarketingZhengzaiRelationVo.createIndex({selfMarketId:"hashed"});
db.GoblinMarketingZhengzaiRelationVo.createIndex({storeId:"hashed"});
db.GoblinOrderLogVo.createIndex({orderId:"hashed"});
db.GoblinOrderLogVo.createIndex({spuId:"hashed"});
db.GoblinOrderLogVo.createIndex({skuId:"hashed"});
db.GoblinOrderLogVo.createIndex({status:"hashed"});
db.GoblinOrderSkuVo.createIndex({orderSkuId:"hashed"});
db.GoblinOrderSkuVo.createIndex({orderId:"hashed"});
db.GoblinSelfMarketingVo.createIndex({selfMarketId:"hashed"});
db.GoblinSelfMarketingVo.createIndex({performanceId:"hashed"});
db.GoblinStoreOrderVo.createIndex({orderId:"hashed"});
db.GoblinStoreOrderVo.createIndex({storeId:"hashed"});
db.GoblinStoreOrderVo.createIndex({status:"hashed"});
db.GoblinStoreOrderVo.createIndex({orderCode:"hashed"});