Files
GuwandykA 262292651a Fix mini-slider admin CRUD JSON encoding and drop seed data from the migration.
Encode title as JSON text so create/list work with pgx, and keep the table migration permission-free so rows are added from admin.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 19:04:48 +05:00

41 lines
892 B
Go

package mini_slider
import (
"time"
)
type DataMiniSliderDTO struct {
MiniSliders []MiniSliderListItemDTO `json:"miniSliders"`
Count int `json:"count"`
}
type Language struct {
Tm string `json:"tm"`
Ru string `json:"ru"`
En string `json:"en"`
}
type MiniSliderListItemDTO struct {
Id int `json:"Id"`
Title Language `json:"title"`
Image string `json:"imagePath"`
CreatedAt time.Time `json:"createdAt"`
}
type GetMiniSliderDTO struct {
Id int `json:"Id"`
Title Language `json:"title"`
Image string `json:"imagePath"`
CreatedAt time.Time `json:"createdAt"`
}
type AddMiniSliderDTO struct {
Title Language `json:"title" binding:"required"`
Image string `json:"imagePath"`
}
type UpdateMiniSliderDTO struct {
Title Language `json:"title" binding:"required"`
Image string `json:"imagePath"`
}