From 02b699f144a1534f37aa76be802c152e30fef598 Mon Sep 17 00:00:00 2001 From: Nguyen Minh Date: Fri, 15 Mar 2024 14:44:15 +0700 Subject: [PATCH] feature/update-location-ward --- model/location_response.go | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/model/location_response.go b/model/location_response.go index e48bdce..47c6c2b 100644 --- a/model/location_response.go +++ b/model/location_response.go @@ -28,10 +28,17 @@ type ( // LocationWard ... LocationWard struct { - ID string `json:"id"` - Name string `json:"name"` - Code int `json:"code"` - Slug string `json:"slug"` + ID string `json:"id"` + Name string `json:"name"` + Code int `json:"code"` + Slug string `json:"slug"` + Location *GEOLocation `json:"location"` + } + + // GEOLocation ... + GEOLocation struct { + Type string `bson:"type" json:"type"` + Coordinates []float64 `bson:"coordinates" json:"coordinates"` } // LocationProvinceResponse ... @@ -76,12 +83,13 @@ type ( // LocationWardDetailResponse ... LocationWardDetailResponse struct { - ID string `json:"_id"` - Name string `json:"name"` - OldSlugs []string `json:"oldSlugs"` - Slug string `json:"slug"` - Code int `json:"code"` - DistrictCode int `json:"districtCode"` - ProvinceCode int `json:"provinceCode"` + ID string `json:"_id"` + Name string `json:"name"` + OldSlugs []string `json:"oldSlugs"` + Slug string `json:"slug"` + Code int `json:"code"` + DistrictCode int `json:"districtCode"` + ProvinceCode int `json:"provinceCode"` + Location *GEOLocation `json:"location"` } )