Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Latest commit

 

History

History
91 lines (72 loc) · 2.81 KB

校车数据存储设计.md

File metadata and controls

91 lines (72 loc) · 2.81 KB

校车数据存储设计

校车数据采用静态导入的方式,提前存储进小程序云开发数据库。详细的数据请见>班车源数据

一下介绍如何查询云数据库中的校车数据。

一、总览

字段英文名 字段中文名 字段值 备注(值) 视图显示 数据请求
startTime 发车开始时间 number
endTime 发车结束时间 number
amount 数量 number 班车数量
line 线路 string 班车名
site 停靠站点 string 停靠的站点
direction 方向 string 正反向
validDay 有效时间 string workingDay/weekend
validSeason 有效季节 string winter/summer
isValid 是否有效 boolean
remark 备注 string

二、具体字段

1. line---- 线路

可选值 备注
busLine_1 象山线
busLine_2 亚青线

2. site---- 停靠站点

可选值 备注
busLine_1_forwardSite 象山线正向站点
busLine_1_reverseSite 象山线反向站点
busLine_2_forwardSite 亚青线正向站点
busLine_2_reverseSite 亚青线反向站点

3. direction---- 方向

可选值 备注
forward 正向
reverse 反向

4. validDay---- 有效时间

可选值 备注
workingDay 工作日
weekend 周末

5. validSeason---- 有效季节

可选值 备注
winter 冬季
summer 夏季

6. isValid---- 是否有效

可选值 备注
true 有效
false 特殊原因停运

三、查询方法

db.collection('allBusLine')
  .where({
    isValid: true,
    validDay: "workingDay|weekend",
    validSeason: "winter|summer",
    direction: "forward|reverse",
    startTime: _.gte(7.35)
  })
  .field({
    startTime: true,
    endTime: true,
    amount: true,
    direction: true,
    line: true,
    site: true
  })
  .skip(10)
  .limit(10)
  .get()