{ "schema": { "bsonType": "object", "required": ["code", "name"], "properties": { "_id": { "description": "ID,系统自动生成" }, "code": { "bsonType": "string", "description": "编码", "parentKey": "parent_code" }, "name": { "bsonType": "string", "description": "城市名称", "title": "城市" }, "type": { "bsonType": "int", "description": "城市类型;0省,1市,2区" }, "letter": { "bsonType": "string", "description": "拼音首字母" }, "pinyin": { "bsonType": "string", "description": "城市名称的完整汉语拼音,用于拼音检索" }, "parent_code": { "bsonType": "string", "description": "父级编码" }, "zip_code": { "bsonType": "string", "description": "邮政编码", "title": "邮编" } } }, "index": [ { "IndexName": "code_", "MgoKeySchema": { "MgoIndexKeys": [{ "Name": "code", "Direction": "1" }], "MgoIsUnique": true } }, { "IndexName": "name", "MgoKeySchema": { "MgoIndexKeys": [{ "Name": "name", "Direction": "1" }], "MgoIsUnique": false } }, { "IndexName": "letter", "MgoKeySchema": { "MgoIndexKeys": [{ "Name": "letter", "Direction": "1" }], "MgoIsUnique": false } }, { "IndexName": "pinyin", "MgoKeySchema": { "MgoIndexKeys": [{ "Name": "name", "Direction": "1" }], "MgoIsUnique": false } }, { "IndexName": "parent_code", "MgoKeySchema": { "MgoIndexKeys": [{ "Name": "parent_code", "Direction": "1" }], "MgoIsUnique": false } }, { "IndexName": "zip_code", "MgoKeySchema": { "MgoIndexKeys": [{ "Name": "zip_code", "Direction": "1" }], "MgoIsUnique": false } } ] }