feat: Add low resolution resource images retrieval and update functionality

This commit is contained in:
2025-11-17 20:54:04 +08:00
parent 43273fece2
commit b811ca25c4
4 changed files with 239 additions and 0 deletions

View File

@@ -60,6 +60,14 @@ type ResourceDetailView struct {
Characters []CharacterView `json:"characters"`
}
type LowResResourceImageView struct {
ResourceID uint `json:"resource_id"`
Title string `json:"title"`
ImageID uint `json:"image_id"`
ImageWidth int `json:"image_width"`
ImageHeight int `json:"image_height"`
}
func (r *Resource) ToView() ResourceView {
tags := make([]TagView, len(r.Tags))
for i, tag := range r.Tags {