merch-api/internal/merch/dto.go

48 lines
903 B
Go
Raw Normal View History

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"`
}