package task import "gorm.io/gorm" // TaskHandler 结构体 type TaskHandler struct { db *gorm.DB } func NewTaskHandler(db *gorm.DB) *TaskHandler { return &TaskHandler{db: db} } // TaskResponse 任务列表响应结构体 type TaskResponse struct { // ... 复制原有字段 ... } // TaskDetailResponse 任务详情响应结构体 type TaskDetailResponse struct { // ... 复制原有字段 ... } // TaskCommentResponse 任务评论响应结构体 type TaskCommentResponse struct { // ... 复制原有字段 ... }