daShangDao_planA/type/common.go

25 lines
677 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package _type
//通用结构体
// CreateTaskResponse 创建任务响应结构体
type CreateTaskResponse struct {
Msg string `json:"msg"`
Code int `json:"code"`
TaskID string `json:"taskId"`
}
type Page struct {
PageNum int // 页码从1开始
PageSize int // 每页条数
}
// APIResponse API响应结构体
// 用于统一API接口的返回格式
type APIResponse struct {
Success bool `json:"success"` // 请求是否成功
Message string `json:"message"` // 响应消息
Data interface{} `json:"data,omitempty"` // 响应数据(可选)
Error string `json:"error,omitempty"` // 错误信息(可选)
}