feat: implement geometry domain with repository, service, and data conversion utilities

This commit is contained in:
2026-05-06 06:43:57 +07:00
parent fcb7f321dd
commit fe9543d896
9 changed files with 335 additions and 159 deletions

View File

@@ -7,17 +7,29 @@ import (
)
type GeometryEntity struct {
ID string `json:"id"`
GeoType int16 `json:"geo_type"`
DrawGeometry json.RawMessage `json:"draw_geometry"`
Binding json.RawMessage `json:"binding"`
TimeStart int32 `json:"time_start"`
TimeEnd int32 `json:"time_end"`
Bbox *response.Bbox `json:"bbox"`
ProjectID string `json:"project_id"`
IsDeleted bool `json:"is_deleted"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"`
ID string `json:"id"`
GeoType int16 `json:"geo_type"`
DrawGeometry json.RawMessage `json:"draw_geometry"`
Binding json.RawMessage `json:"binding"`
TimeStart int32 `json:"time_start"`
TimeEnd int32 `json:"time_end"`
Bbox *response.Bbox `json:"bbox"`
ProjectID string `json:"project_id"`
IsDeleted bool `json:"is_deleted"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"`
}
type EntityGeometriesSearchEntity struct {
EntityID string `json:"entity_id"`
EntityName string `json:"name"`
EntityDescription string `json:"description"`
GeometryID string `json:"id"`
GeoType int16 `json:"geo_type"`
DrawGeometry json.RawMessage `json:"draw_geometry"`
Binding json.RawMessage `json:"binding,omitempty"`
TimeStart *int32 `json:"time_start,omitempty"`
TimeEnd *int32 `json:"time_end,omitempty"`
}
func (g *GeometryEntity) ToResponse() *response.GeometryResponse {