use test_ln_scene;
#创建集合
db.createCollection("KylinCheckUserPerformanceVo");
db.createCollection("KylinCheckUserVo");
db.createCollection("KylinOrderRefundEntitiesVo");
db.createCollection("KylinOrderRefundPicVo");
db.createCollection("KylinOrderRefundsVoBase");
db.createCollection("KylinOrderTicketEntitiesVo");
db.createCollection("KylinOrderTicketVo");
db.createCollection("KylinPerformanceVo");
db.createCollection("KylinRoadShowVo");
db.createCollection("KylinPerformanceMisVo");
db.createCollection("KylinTicketPartnerVo");
db.createCollection("KylinTicketTimesPartnerVo");
db.createCollection("PerformanceMemberAuditParam");

#创建索引
db.KylinCheckUserPerformanceVo.createIndex({checkUserId:"hashed"});
db.KylinCheckUserVo.createIndex({merchantId:"hashed"});
db.KylinCheckUserVo.createIndex({mobile:"hashed"});
db.KylinOrderRefundEntitiesVo.createIndex({orderRefundsId:"hashed"});
db.KylinOrderRefundEntitiesVo.createIndex({orderTicketEntitiesId:"hashed"});
db.KylinOrderRefundPicVo.createIndex({orderRefundsId:"hashed"});
db.KylinOrderRefundsVoBase.createIndex({orderRefundsId:"hashed"});
db.KylinOrderRefundsVoBase.createIndex({orderTicketsId:"hashed"});
db.KylinOrderTicketEntitiesVo.createIndex({orderTicketEntitiesId:"hashed"});
db.KylinOrderTicketEntitiesVo.createIndex({orderId:"hashed"});
db.KylinOrderTicketVo.createIndex({orderTicketsId:"hashed"});
db.KylinOrderTicketVo.createIndex({orderCode:"hashed"});
db.KylinOrderTicketVo.createIndex({userId:"hashed"});
db.KylinPerformanceVo.createIndex({performancesId:"hashed"});
db.KylinPerformanceMisVo.createIndex({performancesId:"hashed"});
db.KylinTicketPartnerVo.createIndex({ticketsId:"hashed"});
db.KylinTicketPartnerVo.createIndex({timesId:"hashed"});
db.KylinTicketTimesPartnerVo.createIndex({performancesId:"hashed"});
db.KylinTicketTimesPartnerVo.createIndex({ticketTimesId:"hashed"});
db.PerformanceMemberAuditParam.createIndex({performancesId:"hashed"});

#创建分片
sh.enableSharding("test_ln_scene");
db.shardCollection("test_ln_scene.KylinCheckUserPerformanceVo",{"checkUserId":"hashed"});
db.shardCollection("test_ln_scene.KylinCheckUserVo",{"checkUserId":"hashed"});
db.shardCollection("test_ln_scene.KylinOrderRefundEntitiesVo",{"orderRefundsEntitiesId":"hashed"});
db.shardCollection("test_ln_scene.KylinOrderRefundPicVo",{"refundPicId":"hashed"});
db.shardCollection("test_ln_scene.KylinOrderRefundsVoBase",{"orderRefundsId":"hashed"});
db.shardCollection("test_ln_scene.KylinOrderTicketEntitiesVo",{"orderTicketEntitiesId":"hashed"});
db.shardCollection("test_ln_scene.KylinOrderTicketVo",{"orderTicketsId":"hashed"});
db.shardCollection("test_ln_scene.KylinPerformanceVo",{"performancesId":"hashed"});
db.shardCollection("test_ln_scene.KylinRoadShowVo",{"roadShowsId":"hashed"});
db.shardCollection("test_ln_scene.KylinPerformanceMisVo",{"performancesId":"hashed"});
db.shardCollection(test_ln_scene.KylinTicketPartnerVo",{"ticketsId":"hashed"});
db.shardCollection(test_ln_scene.KylinTicketTimesPartnerVo",{"ticketTimesId":"hashed"});
db.shardCollection("test_ln_scene.PerformanceMemberAuditParam",{"performancesId":"hashed"});
