From 46f508c1aef0db45f8a7da37ed980f088c205e53 Mon Sep 17 00:00:00 2001 From: sudomarcma <1040211836@qq.com> Date: Wed, 16 Jul 2025 17:57:02 +0800 Subject: [PATCH] feat(geofences): add geofence management table and default entry --- geofence_simple.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 geofence_simple.sql diff --git a/geofence_simple.sql b/geofence_simple.sql new file mode 100644 index 0000000..238ffa8 --- /dev/null +++ b/geofence_simple.sql @@ -0,0 +1,13 @@ +-- Simple geofence management table +CREATE TABLE IF NOT EXISTS `geofences` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `coordinates` text NOT NULL, + `is_active` tinyint(1) DEFAULT 1, + `created_at` timestamp DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Insert current geofence as default +INSERT INTO `geofences` (`name`, `coordinates`) VALUES +('Main Work Area', '[[113.35311466293217,23.161344441258407],[113.28591534444001,23.161344441258407],[113.28591534444001,23.091366234233973],[113.35311466293217,23.091366234233973],[113.35311466293217,23.161344441258407]]');