feat: 支付闭环
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user