use test_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("GoblinStoreErpConfigVo");
db.createCollection("GoblinStoreInfoVo");
db.createCollection("GoblinGoodsInfoVo");
db.createCollection("GoblinGoodsSkuInfoVo");
db.createCollection("GoblinStoreCouponBasicVo");
db.createCollection("GoblinUserCouponBasicVo");
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");



// ================================================== 创建索引
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.GoblinStoreErpConfigVo.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.GoblinUserCouponBasicVo.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"});




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


# 集合
db.createCollection("GoblinNftOrderVo");
db.createCollection("GoblinNftOrderRefundVo");
db.createCollection("GoblinUserDigitalArtworkVo");
db.createCollection("GoblinGoodAnticipateUserVo");
db.createCollection("GoblinGoodsAnticipateValueVo");
db.createCollection("GoblinGoodsAnticipateVo");
db.createCollection("GalaxyUserInfoVo");
db.createCollection("GalaxySeriesInfoVo");
db.createCollection("GalaxySeriesNftInfoVo");
db.createCollection("GalaxySeriesNftUploadVo");
db.createCollection("GalaxyNftOrderVo");
db.createCollection("GalaxyNftOrderBindVo");
db.createCollection("GalaxyNftOrderFailLogVo");
db.createCollection("GalaxyNftTradeVo");
# 索引
db.GoblinNftOrderVo.createIndex({orderId:"hashed"});
db.GoblinNftOrderVo.createIndex({orderCode:"hashed"});
db.GoblinNftOrderVo.createIndex({skuId:"hashed"});
db.GoblinNftOrderVo.createIndex({userId:"hashed"});
db.GoblinNftOrderRefundVo.createIndex({orderRefundId:"hashed"});
db.GoblinNftOrderRefundVo.createIndex({refundCode:"hashed"});
db.GoblinNftOrderRefundVo.createIndex({orderId:"hashed"});
db.GoblinNftOrderRefundVo.createIndex({orderCode:"hashed"});
db.GoblinNftOrderRefundVo.createIndex({userId:"hashed"});
db.GoblinUserDigitalArtworkVo.createIndex({artworkId:"hashed"});
db.GoblinUserDigitalArtworkVo.createIndex({uid:1,delFlg:1,createdAt:1});
db.GoblinGoodAnticipateUserVo.createIndex({skuId:"hashed"});
db.GoblinGoodsAnticipateVo.createIndex({antId:"hashed"});
db.GoblinGoodsAnticipateValueVo.createIndex({skuId:"hashed"});
db.GoblinGoodsAnticipateValueVo.createIndex({antId:"hashed"});
db.GalaxyUserInfoVo.createIndex({userId:"hashed"});
db.GalaxySeriesInfoVo.createIndex({seriesCode:"hashed"});
db.GalaxySeriesNftInfoVo.createIndex({skuId:"hashed"});
db.GalaxySeriesNftUploadVo.createIndex({skuId:"hashed"});
db.GalaxyNftOrderVo.createIndex({nftOrderPayId:"hashed"});
db.GalaxyNftOrderBindVo.createIndex({nftOrderPayId:"hashed"});
db.GalaxyNftOrderFailLogVo.createIndex({nftOrderPayId:"hashed"});
db.GalaxyNftTradeVo.createIndex({nftId:"hashed"});
#  分片
sh.enableSharding("test_ln_scene");
sh.shardCollection("test_ln_scene.GoblinNftOrderVo",{"orderId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinNftOrderRefundVo",{"orderRefundId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinUserDigitalArtworkVo",{"artworkId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinGoodAnticipateUserVo",{"skuId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinGoodsAnticipateValueVo",{"antId":"hashed"});
sh.shardCollection("test_ln_scene.GoblinGoodsAnticipateVo",{"antId":"hashed"});
sh.shardCollection("test_ln_scene.GalaxyUserInfoVo",{"userId":"hashed"});
sh.shardCollection("test_ln_scene.GalaxySeriesInfoVo",{"seriesCode":"hashed"});
sh.shardCollection("test_ln_scene.GalaxySeriesNftInfoVo",{"skuId":"hashed"});
sh.shardCollection("test_ln_scene.GalaxySeriesNftUploadVo",{"skuId":"hashed"});
sh.shardCollection("test_ln_scene.GalaxyNftOrderVo",{"nftOrderPayId":"hashed"});
sh.shardCollection("test_ln_scene.GalaxyNftOrderBindVo",{"nftOrderPayId":"hashed"});
sh.shardCollection("test_ln_scene.GalaxyNftOrderFailLogVo",{"nftOrderPayId":"hashed"});
sh.shardCollection("test_ln_scene.GalaxyNftTradeVo",{"nftId":"hashed"});


# 集合
db.createCollection("GoblinListDetailsVo");
# 索引
db.GoblinListDetailsVo.createIndex({listId:"hashed"});
#  分片
sh.enableSharding("prod_ln_scene");
sh.shardCollection("prod_ln_scene.GoblinListDetailsVo",{"listId":"hashed"});