55 lines
1.4 KiB
Go
55 lines
1.4 KiB
Go
package currency
|
|
|
|
import "time"
|
|
|
|
type DataCurrencyDTO struct {
|
|
Currencies []CurrencyListItemDTO `json:"currencies"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type Language struct {
|
|
Tm string `json:"tm"`
|
|
Ru string `json:"ru"`
|
|
En string `json:"en"`
|
|
}
|
|
|
|
// CurrencyListItemDTO is the list payload — no content (loaded via GetData).
|
|
type CurrencyListItemDTO struct {
|
|
Id int `json:"Id"`
|
|
Title Language `json:"title"`
|
|
Path string `json:"path"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
}
|
|
|
|
type CurrencyDTO struct {
|
|
Id int `json:"Id"`
|
|
Title Language `json:"title"`
|
|
ContentTm string `json:"contentTm"`
|
|
ContentRu string `json:"contentRu"`
|
|
ContentEn string `json:"contentEn"`
|
|
Path string `json:"path"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
}
|
|
|
|
type AddCurrencyDTO struct {
|
|
Title Language `json:"title" binding:"required"`
|
|
ContentTm string `json:"contentTm"`
|
|
ContentRu string `json:"contentRu"`
|
|
ContentEn string `json:"contentEn"`
|
|
Path string `json:"path" binding:"required"`
|
|
}
|
|
|
|
type UpdateCurrencyDTO struct {
|
|
Title Language `json:"title" binding:"required"`
|
|
ContentTm string `json:"contentTm"`
|
|
ContentRu string `json:"contentRu"`
|
|
ContentEn string `json:"contentEn"`
|
|
Path string `json:"path" binding:"required"`
|
|
}
|
|
|
|
type CurrencyIdDTO struct {
|
|
Id int `json:"Id"`
|
|
Title Language `json:"title"`
|
|
Path string `json:"path"`
|
|
}
|