feat: implement geometry and project management modules with associated controllers, services, and routes

This commit is contained in:
2026-05-24 19:34:46 +07:00
parent ff56ba3d32
commit 2fa420492c
11 changed files with 382 additions and 3 deletions

View File

@@ -194,3 +194,14 @@ JOIN entity_geometries eg ON eg.entity_id = e.id AND eg.geometry_id = pairs.gid
JOIN geometries g ON g.id = pairs.gid
WHERE e.is_deleted = false
AND g.is_deleted = false;
-- name: GetGeometriesByBoundWith :many
SELECT
id, geo_type, draw_geometry, bound_with, time_start, time_end, project_id,
ST_XMin(bbox)::float8 as min_lng,
ST_YMin(bbox)::float8 as min_lat,
ST_XMax(bbox)::float8 as max_lng,
ST_YMax(bbox)::float8 as max_lat,
is_deleted, created_at, updated_at
FROM geometries
WHERE bound_with = $1 AND is_deleted = false;