告警记录保存位置快照

This commit is contained in:
stu2not
2026-05-27 17:06:12 +08:00
parent 356e333c81
commit 1b75435a3c
11 changed files with 321 additions and 5 deletions

View File

@@ -448,6 +448,13 @@ CREATE TABLE IF NOT EXISTS `device_alarm_events` (
`owner_user_id` BIGINT NULL,
`child_id` BIGINT NULL,
`source_msg_id` VARCHAR(8) NOT NULL DEFAULT '010',
`coord_type` VARCHAR(16) NULL,
`lat` DECIMAL(10, 7) NULL,
`lng` DECIMAL(10, 7) NULL,
`location_updated_at` DATETIME NULL,
`address` VARCHAR(255) NULL,
`address_resolved_at` DATETIME NULL,
`address_resolve_status` TINYINT NULL COMMENT '0=pending,1=success,2=failed',
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`alarm_id`),
KEY `idx_device_alarm_device_created` (`device_id`, `created_at`),