init: initial commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package response
|
||||
|
||||
//type BadgeGroup struct {
|
||||
// CategoryName string `json:"categoryName" comment:"分类名称"`
|
||||
// BadgeList []plant.Badge `json:"badgeList"`
|
||||
//}
|
||||
@@ -0,0 +1,12 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"sundynix-go/model/plant"
|
||||
)
|
||||
|
||||
// PlantTaskVO 植物任务
|
||||
type PlantTaskVO struct {
|
||||
MyPlant *plant.MyPlant
|
||||
HasExpired bool `json:"hasExpired"`
|
||||
Tasks []*plant.CareTask `json:"tasks"`
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package response
|
||||
|
||||
// BaikeInfo 植物百科信息(baike_info子对象)
|
||||
type BaikeInfo struct {
|
||||
BaikeUrl string `json:"baike_url"` // 百度百科链接
|
||||
ImageUrl string `json:"image_url"` // 植物图片链接
|
||||
Description string `json:"description"` // 植物百科描述文本
|
||||
}
|
||||
|
||||
// ResultItem 识别结果项(result数组中的单个元素)
|
||||
type ResultItem struct {
|
||||
Score float64 `json:"score"` // 匹配相似度得分(0-1)
|
||||
Name string `json:"name"` // 植物名称
|
||||
BaikeInfo *BaikeInfo `json:"baike_info"` // 植物百科信息(部分结果可能无此字段,用指针避免空值解析问题)
|
||||
}
|
||||
|
||||
// PlantRecognitionResponse 植物识别接口的HTTP响应结构体
|
||||
// 字段标签仅保留 json,严格匹配返回的JSON字段名
|
||||
type PlantRecognitionResponse struct {
|
||||
LogId uint64 `json:"log_id"` // 识别请求日志ID(唯一标识)
|
||||
Result []ResultItem `json:"result"` // 植物识别结果列表
|
||||
}
|
||||
Reference in New Issue
Block a user