feat: 支付闭环

This commit is contained in:
Blizzard
2026-03-04 17:05:48 +08:00
parent 042c99aa46
commit 7a32f8a351
31 changed files with 902 additions and 503 deletions
-20
View File
@@ -1,7 +1,5 @@
package response
import "sundynix-go/model/radio"
// CategoryResponse 分类响应
type CategoryResponse struct {
Id string `json:"id"`
@@ -23,21 +21,3 @@ type CategoryDetailResponse struct {
Sort int `json:"sort"`
Status int `json:"status"`
}
// ToCategoryResponse 转换为分类响应
func ToCategoryResponse(category *radio.RadioCategory) CategoryResponse {
resp := CategoryResponse{
Id: category.Id,
Name: category.Name,
Description: category.Description,
Sort: category.Sort,
Status: category.Status,
}
if category.Icon != nil {
resp.Icon = category.Icon.Url
}
if category.Cover != nil {
resp.CoverUrl = category.Cover.Url
}
return resp
}