feat 建表
This commit is contained in:
24
src/service/rtkTrack.ts
Normal file
24
src/service/rtkTrack.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* RTK 轨迹数据表
|
||||
* 字段说明:
|
||||
* - id:轨迹唯一标识符
|
||||
* - work_record_id:作业记录 ID
|
||||
* - timestamp:时间戳
|
||||
* - latitude:纬度
|
||||
* - longitude:经度
|
||||
* - altitude:高度
|
||||
* - speed:速度
|
||||
* - heading:方向
|
||||
*/
|
||||
export const rtkTrackTableSql = `CREATE TABLE IF NOT EXISTS rtk_track (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
work_record_id INTEGER,
|
||||
timestamp DATETIME,
|
||||
latitude REAL,
|
||||
longitude REAL,
|
||||
altitude REAL,
|
||||
speed REAL,
|
||||
heading REAL,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (work_record_id) REFERENCES work_record(id)
|
||||
)`
|
||||
Reference in New Issue
Block a user