This commit is contained in:
guwandyk committed 2026-08-04 12:50:20 +05:00
1 parent 4194cef934
commit 363127fe9e
3350 files changed
+1284220 -1

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
package category
import "time"
type DataCategoryDTO struct {
Categories []CategoryDTO `json:"categories"`
Count int `json:"count"`
}
type Language struct {
Tm string `json:"tm"`
Ru string `json:"ru"`
En string `json:"en"`
}
type CategoryDTO struct {
Id int `json:"Id"`
Name Language `json:"name"`
SubName []Language `json:"subCategories"`
Status bool `json:"status"`
CreatedAt time.Time `json:"createdAt"`
}
type AddCategoryDTO struct {
Name Language `json:"name" binding:"required"`
}
type UpdateCategoryDTO struct {
Name Language `json:"name" binding:"required"`
// Status intentionally has no "required" binding: the validator treats
// false as a missing value, which would make it impossible to update a
// disabled category.
Status bool `json:"status"`
}
type CategoryIdDTO struct {
Id int `json:"Id"`
Name Language `json:"name"`
Status bool `json:"status"`
}
type PaginationDTO struct {
Limit int `json:"limit"`
Page int `json:"page"`
}
type ReqIdDTO struct {
Id int `json:"Id"`
}