feat 建表

This commit is contained in:
Ironsp
2026-09-08 16:46:06 +08:00
parent bbde4c4a66
commit 3d304ec8c9
6 changed files with 128 additions and 197 deletions

24
src/service/rtkTrack.ts Normal file
View 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)
)`