Files
GuwandykA 1987d4f596 Add region and etrap APIs for branch create form.
Expose distinct regions and etraps-by-region under provinces and branches, and seed real etraps per welayat.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 12:12:07 +05:00

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"`
}