opendb/collection/opendb-poi/collection.json

113 lines
3.3 KiB
JSON
Raw Permalink Normal View History

2023-07-04 17:00:11 +08:00
{
"schema": {
"bsonType": "object",
2023-08-02 12:02:44 +08:00
"required": ["location", "title"],
2023-07-04 17:00:11 +08:00
"permission": {
"read": "doc.visible == true",
"create": false,
"update": false,
"delete": false
},
"properties": {
"_id": {
"description": "ID系统自动生成"
},
"visible": {
2023-08-01 20:37:23 +08:00
"title": "是否显示",
2023-07-04 17:00:11 +08:00
"bsonType": "bool",
"description": "为true代表前端clientDB可直接查询 false则clientDB不可以查询"
},
2023-08-01 20:37:23 +08:00
"category": {
"bsonType": "string",
"title": "分类",
"description": "用于区分显示在不同的场景地图下"
},
"type": {
"bsonType": "string",
"title": "类型",
"description": "POI类型可根据type自动匹配对应的icon支持直接输入中文"
},
"icon": {
"bsonType": "string",
"title": "图标",
"description": "支持https网络路径或本地绝对路径如果传了icon则不再根据type去匹配icon"
},
"rotate": {
"bsonType": "number",
"title": "图标角度",
"description": "POI图标的角度需保证0°的图片方向应朝左(西) 故可得90° 朝上(北) 180° 朝右(东) 270° 朝下(南)"
},
"level": {
"bsonType": "number",
"title": "图标显示的层级",
"description": "POI图标显示的层级越高越现在在上面"
},
2023-07-04 17:00:11 +08:00
"location": {
"title": "地理位置",
2023-08-01 20:37:23 +08:00
"bsonType": "object",
2023-07-04 17:00:11 +08:00
"description": "地理位置(包含经纬度)"
},
"title": {
"bsonType": "string",
"title": "名称",
"description": "名称"
},
"address": {
"bsonType": "string",
"title": "地址",
"description": "地址"
},
2023-08-01 20:37:23 +08:00
"tel": {
"bsonType": "string",
"title": "电话",
"description": "电话"
},
2023-07-04 17:00:11 +08:00
"province": {
"bsonType": "string",
"title": "省",
"description": "省"
},
"city": {
"bsonType": "string",
"title": "市",
"description": "市"
},
"district": {
"bsonType": "string",
"title": "区/县",
"description": "区/县"
},
"create_date": {
2023-08-01 20:37:23 +08:00
"title": "创建时间",
2023-07-04 17:00:11 +08:00
"bsonType": "timestamp",
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
},
"index": [
{
"IndexName": "location",
"MgoKeySchema": { "MgoIndexKeys": [{ "Name": "location", "Direction": "2dsphere" }], "MgoIsUnique": false }
},
{
"IndexName": "visible",
"MgoKeySchema": {"MgoIndexKeys": [{"Name": "visible","Direction": "1"}],"MgoIsUnique": false}
},
{
"IndexName": "province-city-district",
"MgoKeySchema": {"MgoIndexKeys": [{"Name": "province","Direction": "1"},{"Name": "city","Direction": "1"},{"Name": "district","Direction": "1"}],"MgoIsUnique": false}
},
{
"IndexName": "create_date",
"MgoKeySchema": {"MgoIndexKeys": [{"Name": "create_date","Direction": "1"}],"MgoIsUnique": false}
2023-08-01 20:37:23 +08:00
},
{
"IndexName": "category",
"MgoKeySchema": {"MgoIndexKeys": [{"Name": "category","Direction": "1"}],"MgoIsUnique": false}
2023-07-04 17:00:11 +08:00
}
]
}