2026-03-01 22:14:43 +03:00
|
|
|
package merch
|
|
|
|
|
|
2026-03-04 17:59:46 +03:00
|
|
|
import "time"
|
|
|
|
|
|
2026-03-04 17:02:11 +03:00
|
|
|
// Origins
|
2026-03-01 22:14:43 +03:00
|
|
|
type newOriginDTO struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
type originsDTO struct {
|
|
|
|
|
Origins []originItem `json:"origins"`
|
|
|
|
|
}
|
|
|
|
|
type originItem struct {
|
2026-03-04 17:02:11 +03:00
|
|
|
Id int64 `json:"id"`
|
2026-03-01 22:14:43 +03:00
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type deleteOriginDTO struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
2026-03-04 17:02:11 +03:00
|
|
|
|
|
|
|
|
// Merch
|
|
|
|
|
type newMerchDTO struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Links []originLink `json:"links"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type originLink struct {
|
2026-03-07 15:49:54 +03:00
|
|
|
Origin string `json:"origin"`
|
|
|
|
|
Link string `json:"origin_link"`
|
2026-03-04 17:02:11 +03:00
|
|
|
}
|
2026-03-04 17:59:46 +03:00
|
|
|
|
|
|
|
|
type merchDTO struct {
|
|
|
|
|
CreatedAt time.Time `json:"created_at"`
|
|
|
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
2026-03-07 15:49:54 +03:00
|
|
|
|
|
|
|
|
type updateMerchDTO struct {
|
|
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type extraDataDTO struct {
|
|
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
Links []originLink `json:"links"`
|
|
|
|
|
}
|
2026-03-10 23:44:24 +03:00
|
|
|
|
2026-03-16 21:09:01 +03:00
|
|
|
type listResponse struct {
|
2026-03-13 16:51:04 +03:00
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Labels []string `json:"labels,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 21:09:01 +03:00
|
|
|
type singleMerchResponse struct {
|
|
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Origins []originLink `json:"origins"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-13 16:51:04 +03:00
|
|
|
type getMerchInternal struct {
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-10 23:44:24 +03:00
|
|
|
// prices dtos
|
|
|
|
|
type PriceEntry struct {
|
|
|
|
|
CreatedAt int64 `json:"created_at"`
|
|
|
|
|
Value int `json:"value"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type OriginWithPrices struct {
|
|
|
|
|
Origin string `json:"origin"`
|
|
|
|
|
Prices []PriceEntry
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type PricesResponse struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
Origins []OriginWithPrices `json:"origins"`
|
|
|
|
|
}
|
2026-03-11 19:32:14 +03:00
|
|
|
|
|
|
|
|
type ZeroPrice struct {
|
|
|
|
|
Id int64 `json:"id,omitempty"`
|
|
|
|
|
CreatedAt time.Time `json:"created_at,omitempty"`
|
|
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Origin string `json:"origin"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type DeleteZeroPrices struct {
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
}
|
2026-03-13 16:02:49 +03:00
|
|
|
|
|
|
|
|
// Labels
|
|
|
|
|
type LabelDTO struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Color string `json:"color,omitempty"`
|
|
|
|
|
BgColor string `json:"bg_color,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type LabelsList struct {
|
|
|
|
|
LabelUuid string `json:"label_uuid"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Color string `json:"color,omitempty"`
|
|
|
|
|
BgColor string `json:"bg_color,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type LabelLink struct {
|
|
|
|
|
MerchUuid string `json:"merch_uuid"`
|
|
|
|
|
LabelUuid string `json:"label_uuid"`
|
|
|
|
|
}
|