natsio/model/location_response.go

96 lines
2.7 KiB
Go
Raw Normal View History

2022-08-26 10:15:49 +00:00
package model
2023-01-17 09:29:47 +00:00
type (
// ResponseLocationAddress ...
ResponseLocationAddress struct {
Province LocationProvince `json:"province"`
District LocationDistrict `json:"district"`
Ward LocationWard `json:"ward"`
}
// LocationProvince ...
LocationProvince struct {
ID string `json:"id"`
Name string `json:"name"`
Code int `json:"code"`
Slug string `json:"slug"`
RegionCode string `json:"regionCode"`
MainRegionCode string `json:"mainRegionCode"`
}
// LocationDistrict ...
LocationDistrict struct {
ID string `json:"id"`
Name string `json:"name"`
Code int `json:"code"`
Slug string `json:"slug"`
}
// LocationWard ...
LocationWard struct {
2024-03-15 07:44:15 +00:00
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"`
2023-01-17 09:29:47 +00:00
}
// LocationProvinceResponse ...
LocationProvinceResponse struct {
Provinces []LocationProvince `json:"provinces"`
}
// LocationDistrictResponse ...
LocationDistrictResponse struct {
Districts []LocationDistrict `json:"districts"`
}
// LocationWardResponse ...
LocationWardResponse struct {
Wards []LocationWard `json:"wards"`
}
// LocationProvinceDetailResponse ...
LocationProvinceDetailResponse struct {
ID string `json:"_id"`
Name string `json:"name"`
Slug string `json:"slug"`
Code int `json:"code"`
CountryCode string `json:"countryCode"`
RegionCode string `json:"regionCode"`
MainRegionCode string `json:"mainRegionCode"`
TotalDistricts int `json:"totalDistricts"`
TotalWards int `json:"totalWards"`
}
// LocationDistrictDetailResponse ...
LocationDistrictDetailResponse struct {
ID string `json:"_id"`
Name string `json:"name"`
OldSlugs []string `json:"oldSlugs"`
Slug string `json:"slug"`
Code int `json:"code"`
ProvinceCode int `json:"provinceCode"`
Area int `json:"area"`
TotalWards int `json:"totalWards"`
}
// LocationWardDetailResponse ...
LocationWardDetailResponse struct {
2024-03-15 07:44:15 +00:00
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"`
2023-01-17 09:29:47 +00:00
}
)