Files
main-tbbank/backend/internal/admin/banner/dto.go
2026-08-18 00:59:32 +05:00

57 lines
1.4 KiB
Go
Executable File

package banner
import "time"
type DataBannerDTO struct {
Categories []BannerListItemDTO `json:"banners"`
Count int `json:"count"`
}
type Language struct {
Tm string `json:"tm"`
Ru string `json:"ru"`
En string `json:"en"`
}
// BannerListItemDTO is the list payload — no content (loaded via GetOne).
type BannerListItemDTO struct {
Id int `json:"Id"`
Title Language `json:"title"`
Image string `json:"imagePath"`
CreatedAt time.Time `json:"createdAt"`
}
type GetBannerDTO struct {
Id int `json:"Id"`
Title Language `json:"title"`
ContentTm string `json:"contentTm"`
ContentRu string `json:"contentRu"`
ContentEn string `json:"contentEn"`
Image string `json:"imagePath"`
CreatedAt time.Time `json:"createdAt"`
}
type AddBannerDTO struct {
Title Language `json:"title" binding:"required"`
ContentTm string `json:"contentTm"`
ContentRu string `json:"contentRu"`
ContentEn string `json:"contentEn"`
Image string `json:"imagePath"`
}
type UpdateBannerDTO struct {
Title Language `json:"title" binding:"required"`
ContentTm string `json:"contentTm"`
ContentRu string `json:"contentRu"`
ContentEn string `json:"contentEn"`
Image string `json:"imagePath"`
}
type ReqUUIDDTO struct {
Id int `json:"Id"`
}
type ReqIDDTO struct {
Id int `json:"id"`
}