45 lines
1.0 KiB
Go
45 lines
1.0 KiB
Go
package location
|
|
|
|
type LocalizedTitle struct {
|
|
En string `json:"en"`
|
|
Ru string `json:"ru"`
|
|
Tm string `json:"tm"`
|
|
}
|
|
|
|
type LocationDTO struct {
|
|
Id int64 `json:"id"`
|
|
ProvinceId int64 `json:"provinceId"`
|
|
Title LocalizedTitle `json:"title"`
|
|
Status bool `json:"status"`
|
|
}
|
|
|
|
type CreateLocationDTO struct {
|
|
ProvinceId int64 `json:"provinceId" binding:"required"`
|
|
Title LocalizedTitle `json:"title" binding:"required"`
|
|
Status *bool `json:"status"`
|
|
}
|
|
|
|
type UpdateLocationDTO struct {
|
|
ProvinceId int64 `json:"provinceId" binding:"required"`
|
|
Title LocalizedTitle `json:"title" binding:"required"`
|
|
Status bool `json:"status"`
|
|
}
|
|
|
|
type UpdateLocationStatusDTO struct {
|
|
Status bool `json:"status"`
|
|
}
|
|
|
|
type ListFilter struct {
|
|
ProvinceID *int64
|
|
ProvinceName string
|
|
LocationName string
|
|
Status *bool
|
|
Page int
|
|
Limit int
|
|
}
|
|
|
|
type ListLocationDTO struct {
|
|
Count int64 `json:"count"`
|
|
Locations []LocationDTO `json:"locations"`
|
|
}
|