mirror of
https://gitee.com/dcloud/opendb.git
synced 2024-11-13 06:23:01 +08:00
4f44952e78
2. 数据表索引简化
160 lines
4.7 KiB
JSON
160 lines
4.7 KiB
JSON
{
|
||
"schema":{
|
||
"bsonType":"object",
|
||
"description":"存储汇总的设备/用户的粘性数据",
|
||
"required":[
|
||
],
|
||
"permission":{
|
||
"read":false,
|
||
"create":false,
|
||
"update":false,
|
||
"delete":false
|
||
},
|
||
"properties":{
|
||
"_id":{
|
||
"description":"ID,系统自动生成"
|
||
},
|
||
"appid":{
|
||
"bsonType":"string",
|
||
"description":"应用ID"
|
||
},
|
||
"platform_id":{
|
||
"bsonType":"string",
|
||
"description":"应用平台ID,对应uni-stat-app-platforms._id",
|
||
"foreignKey":"uni-stat-app-platforms._id"
|
||
},
|
||
"channel_id":{
|
||
"bsonType":"string",
|
||
"description":"渠道/场景值ID,对应uni-stat-app-channels._id",
|
||
"foreignKey":"uni-stat-app-channels._id"
|
||
},
|
||
"version_id":{
|
||
"bsonType":"string",
|
||
"description":"应用版本ID,对应opendb-app-versions._id",
|
||
"foreignKey":"opendb-app-versions._id"
|
||
},
|
||
"visit_depth_data":{
|
||
"bsonType":"object",
|
||
"description":"访问深度数据",
|
||
"properties":{
|
||
"visit_users":{
|
||
"bsonType":"object",
|
||
"description":"访问用户数"
|
||
},
|
||
"visit_devices":{
|
||
"bsonType":"object",
|
||
"description":"访问设备数"
|
||
},
|
||
"visit_times":{
|
||
"bsonType":"object",
|
||
"description":"访问次数"
|
||
}
|
||
}
|
||
},
|
||
"duration_data":{
|
||
"bsonType":"object",
|
||
"description":"访问时长数据",
|
||
"properties":{
|
||
"visit_users":{
|
||
"bsonType":"object",
|
||
"description":"访问用户数"
|
||
},
|
||
"visit_devices":{
|
||
"bsonType":"object",
|
||
"description":"访问设备数"
|
||
},
|
||
"visit_times":{
|
||
"bsonType":"object",
|
||
"description":"访问次数"
|
||
}
|
||
}
|
||
},
|
||
"stat_date":{
|
||
"bsonType":"int",
|
||
"description":"统计日期,格式yyyymmdd,例:20211201"
|
||
},
|
||
"start_time":{
|
||
"bsonType":"timestamp",
|
||
"description":"开始时间"
|
||
},
|
||
"end_time":{
|
||
"bsonType":"timestamp",
|
||
"description":"结束时间"
|
||
}
|
||
}
|
||
},
|
||
"index":[
|
||
{
|
||
"IndexName":"start_time",
|
||
"MgoKeySchema":{
|
||
"MgoIndexKeys":[
|
||
{
|
||
"Name":"start_time",
|
||
"Direction":"1"
|
||
}
|
||
],
|
||
"MgoIsUnique":false
|
||
}
|
||
},
|
||
{
|
||
"IndexName":"appid",
|
||
"MgoKeySchema":{
|
||
"MgoIndexKeys":[
|
||
{
|
||
"Name":"appid",
|
||
"Direction":"1"
|
||
}
|
||
],
|
||
"MgoIsUnique":false
|
||
}
|
||
},
|
||
{
|
||
"IndexName":"version_id",
|
||
"MgoKeySchema":{
|
||
"MgoIndexKeys":[
|
||
{
|
||
"Name":"version_id",
|
||
"Direction":"1"
|
||
}
|
||
],
|
||
"MgoIsUnique":false
|
||
}
|
||
},
|
||
{
|
||
"IndexName":"platform_id",
|
||
"MgoKeySchema":{
|
||
"MgoIndexKeys":[
|
||
{
|
||
"Name":"platform_id",
|
||
"Direction":"1"
|
||
}
|
||
],
|
||
"MgoIsUnique":false
|
||
}
|
||
},
|
||
{
|
||
"IndexName":"channel_id",
|
||
"MgoKeySchema":{
|
||
"MgoIndexKeys":[
|
||
{
|
||
"Name":"channel_id",
|
||
"Direction":"1"
|
||
}
|
||
],
|
||
"MgoIsUnique":false
|
||
}
|
||
},
|
||
{
|
||
"IndexName":"dimension",
|
||
"MgoKeySchema":{
|
||
"MgoIndexKeys":[
|
||
{
|
||
"Name":"dimension",
|
||
"Direction":"1"
|
||
}
|
||
],
|
||
"MgoIsUnique":false
|
||
}
|
||
}
|
||
]
|
||
} |