Expose distinct regions and etraps-by-region under provinces and branches, and seed real etraps per welayat. Co-authored-by: Cursor <cursoragent@cursor.com>
49 lines
1.0 KiB
Go
49 lines
1.0 KiB
Go
package province
|
|
|
|
type LocalizedName struct {
|
|
En string `json:"en"`
|
|
Ru string `json:"ru"`
|
|
Tm string `json:"tm"`
|
|
}
|
|
|
|
type ProvinceDTO struct {
|
|
Id int64 `json:"id"`
|
|
Name LocalizedName `json:"name"`
|
|
Region LocalizedName `json:"region"`
|
|
Active bool `json:"active"`
|
|
}
|
|
|
|
type CreateProvinceDTO struct {
|
|
Name LocalizedName `json:"name" binding:"required"`
|
|
Region LocalizedName `json:"region" binding:"required"`
|
|
Active *bool `json:"active"`
|
|
}
|
|
|
|
type UpdateProvinceDTO struct {
|
|
Name LocalizedName `json:"name" binding:"required"`
|
|
Region LocalizedName `json:"region" binding:"required"`
|
|
Active bool `json:"active"`
|
|
}
|
|
|
|
type ListFilter struct {
|
|
Name string
|
|
Region string
|
|
Active *bool
|
|
Page int
|
|
Limit int
|
|
}
|
|
|
|
type ListProvinceDTO struct {
|
|
Count int64 `json:"count"`
|
|
Provinces []ProvinceDTO `json:"provinces"`
|
|
}
|
|
|
|
type ListRegionsDTO struct {
|
|
Regions []LocalizedName `json:"regions"`
|
|
}
|
|
|
|
type ListEtrapsDTO struct {
|
|
Count int64 `json:"count"`
|
|
Etraps []ProvinceDTO `json:"etraps"`
|
|
}
|