2020-12-18 19:38:14 +08:00
|
|
|
|
{
|
|
|
|
|
"schema": {
|
|
|
|
|
"bsonType": "object",
|
|
|
|
|
"required": ["code", "name"],
|
2020-12-26 16:18:11 +08:00
|
|
|
|
"permission": {
|
|
|
|
|
"read": true,
|
|
|
|
|
"create": false,
|
|
|
|
|
"update": false,
|
|
|
|
|
"delete": false
|
|
|
|
|
},
|
2020-12-18 19:38:14 +08:00
|
|
|
|
"properties": {
|
|
|
|
|
"_id": {
|
|
|
|
|
"description": "ID,系统自动生成"
|
|
|
|
|
},
|
|
|
|
|
"code": {
|
|
|
|
|
"bsonType": "string",
|
2020-12-26 19:45:22 +08:00
|
|
|
|
"description": "编码"
|
2020-12-18 19:38:14 +08:00
|
|
|
|
},
|
2020-12-25 11:27:40 +08:00
|
|
|
|
"parent_code": {
|
|
|
|
|
"bsonType": "string",
|
2020-12-26 19:45:22 +08:00
|
|
|
|
"description": "父级编码",
|
|
|
|
|
"parentKey": "code"
|
2020-12-25 11:27:40 +08:00
|
|
|
|
},
|
2020-12-18 19:38:14 +08:00
|
|
|
|
"name": {
|
|
|
|
|
"bsonType": "string",
|
2020-12-19 14:25:40 +08:00
|
|
|
|
"description": "城市名称",
|
|
|
|
|
"title": "城市"
|
|
|
|
|
},
|
|
|
|
|
"type": {
|
|
|
|
|
"bsonType": "int",
|
|
|
|
|
"description": "城市类型;0省,1市,2区"
|
|
|
|
|
},
|
2020-12-31 15:04:43 +08:00
|
|
|
|
"first_letter": {
|
2020-12-19 14:25:40 +08:00
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "拼音首字母"
|
|
|
|
|
},
|
|
|
|
|
"pinyin": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "城市名称的完整汉语拼音,用于拼音检索"
|
2020-12-18 19:38:14 +08:00
|
|
|
|
},
|
2020-12-19 14:25:40 +08:00
|
|
|
|
"zip_code": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "邮政编码",
|
|
|
|
|
"title": "邮编"
|
2020-12-18 19:38:14 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-12-19 14:25:40 +08:00
|
|
|
|
"index": [
|
|
|
|
|
{
|
|
|
|
|
"IndexName": "code_",
|
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [{
|
|
|
|
|
"Name": "code",
|
|
|
|
|
"Direction": "1"
|
|
|
|
|
}],
|
|
|
|
|
"MgoIsUnique": true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"IndexName": "name",
|
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [{
|
|
|
|
|
"Name": "name",
|
|
|
|
|
"Direction": "1"
|
|
|
|
|
}],
|
|
|
|
|
"MgoIsUnique": false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
2020-12-31 15:08:25 +08:00
|
|
|
|
"IndexName": "first_letter",
|
2020-12-19 14:25:40 +08:00
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [{
|
2020-12-31 15:08:25 +08:00
|
|
|
|
"Name": "first_letter",
|
2020-12-19 14:25:40 +08:00
|
|
|
|
"Direction": "1"
|
|
|
|
|
}],
|
|
|
|
|
"MgoIsUnique": false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"IndexName": "pinyin",
|
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [{
|
2021-05-24 10:04:07 +08:00
|
|
|
|
"Name": "pinyin",
|
2020-12-19 14:25:40 +08:00
|
|
|
|
"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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2020-12-18 19:38:14 +08:00
|
|
|
|
}
|