use test_ln_scene;
#创建集合
db.createCollection("KylinOrderTicketVo");
db.createCollection("KylinOrderTicketEntitiesVo");

#创建索引
db.KylinOrderTicketVo.createIndex({orderTicketsId:"hashed"});
db.KylinOrderTicketVo.createIndex({orderCode:"hashed"});
db.KylinOrderTicketVo.createIndex({userId:"hashed"});

db.KylinOrderTicketEntitiesVo.createIndex({orderTicketEntitiesId:"hashed"});
db.KylinOrderTicketEntitiesVo.createIndex({orderId:"hashed"});


#创建分片
sh.enableSharding("test_ln_scene");

sh.shardCollection("test_ln_scene.KylinOrderTicketVo",{"orderTicketsId":"hashed"});
sh.shardCollection("test_ln_scene.KylinOrderTicketEntitiesVo",{"orderTicketEntitiesId":"hashed"});