108 lines
2.4 KiB
Go
108 lines
2.4 KiB
Go
package merch
|
|
|
|
import (
|
|
"merch-parser-api/internal/api/merch/origins"
|
|
"time"
|
|
)
|
|
|
|
type merchBundle struct {
|
|
Merch *Merch
|
|
Surugaya *origins.OriginSurugaya
|
|
Mandarake *origins.OriginMandarake
|
|
Amiami *origins.OriginAmiami
|
|
}
|
|
type MerchDTO struct {
|
|
MerchUuid string `json:"merch_uuid"`
|
|
Name string `json:"name"`
|
|
OriginSurugaya SurugayaDTO `json:"origin_surugaya"`
|
|
OriginMandarake MandarakeDTO `json:"origin_mandarake"`
|
|
OriginAmiami AmiamiDTO `json:"origin_amiami"`
|
|
Labels []string `json:"labels,omitempty" gorm:"-"`
|
|
}
|
|
|
|
type OriginDTO struct {
|
|
Link string `json:"link"`
|
|
}
|
|
|
|
type SurugayaDTO struct {
|
|
OriginDTO
|
|
}
|
|
|
|
type MandarakeDTO struct {
|
|
OriginDTO
|
|
}
|
|
|
|
type AmiamiDTO struct {
|
|
OriginDTO
|
|
}
|
|
|
|
type SingleMerchResponse struct {
|
|
MerchUuid string `json:"merch_uuid"`
|
|
Name string `json:"name"`
|
|
Origins []any `json:"origins"`
|
|
}
|
|
|
|
type ListResponse struct {
|
|
MerchUuid string `json:"merch_uuid"`
|
|
Name string `json:"name"`
|
|
Labels []string `json:"labels,omitempty" gorm:"-"`
|
|
}
|
|
|
|
type PriceEntry struct {
|
|
CreatedAt int64 `json:"created_at"`
|
|
Value int `json:"value"`
|
|
}
|
|
|
|
type OriginWithPrices struct {
|
|
Origin origins.Origin `json:"origins"`
|
|
Prices []PriceEntry
|
|
}
|
|
|
|
type PricesResponse struct {
|
|
Name string `json:"name"`
|
|
MerchUuid string `json:"merch_uuid"`
|
|
Origins []OriginWithPrices `json:"origins"`
|
|
}
|
|
|
|
type UpdateMerchDTO struct {
|
|
MerchUuid string `json:"merch_uuid"`
|
|
Name string `json:"name"`
|
|
Origin string `json:"origins"`
|
|
Link string `json:"link"`
|
|
}
|
|
|
|
type ImageLink struct {
|
|
Link string `json:"link"`
|
|
ETag string `json:"etag"`
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
type ZeroPrice struct {
|
|
Id int `json:"id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
MerchUuid string `json:"merch_uuid"`
|
|
Name string `json:"name"`
|
|
Origin origins.Origin `json:"origins"`
|
|
}
|
|
|
|
type DeleteZeroPrices struct {
|
|
Id uint `json:"id"`
|
|
MerchUuid string `json:"merch_uuid"`
|
|
}
|