feat(go): persist full raw payload chunks

This commit is contained in:
lingniu
2026-07-02 12:11:24 +08:00
parent 3a67f6e05f
commit 7a9a6f441a
7 changed files with 334 additions and 12 deletions

View File

@@ -30,6 +30,22 @@ func SchemaStatements(database string) []string {
vin NCHAR(32),
phone NCHAR(32),
device_id NCHAR(64)
)`,
`CREATE STABLE IF NOT EXISTS raw_frame_payload_chunks (
ts TIMESTAMP,
event_id NCHAR(64),
frame_id NCHAR(64),
received_at TIMESTAMP,
payload_kind NCHAR(32),
chunk_index INT,
chunk_count INT,
chunk_text BINARY(16000)
) TAGS (
protocol NCHAR(32),
vehicle_key NCHAR(64),
vin NCHAR(32),
phone NCHAR(32),
device_id NCHAR(64)
)`,
`CREATE STABLE IF NOT EXISTS vehicle_locations (
ts TIMESTAMP,