feat(cron): 实现定时任务管理功能
- 新增 cron模块,支持定时任务管理- 实现了任务列表获取、任务添加、任务移除和任务状态获取等接口 - 添加了默认任务,包括数据同步、数据清理、健康检查和缓存刷新等 - 实现了优雅关闭功能,确保在服务停止时正确停止所有任务 - 添加了定时任务相关文档和使用指南
This commit is contained in:
26
internal/model/dto/third_party.go
Normal file
26
internal/model/dto/third_party.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package dto
|
||||
|
||||
// ThirdPartyArtifactDTO represents an artifact from the third-party API.
|
||||
type ThirdPartyArtifactDTO struct {
|
||||
ID string `json:"_id"`
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
Rarity int `json:"rarity"`
|
||||
Exclusive string `json:"exclusive"`
|
||||
AtkBase int `json:"atk_base"`
|
||||
AtkMax int `json:"atk_max"`
|
||||
HPBase int `json:"hp_base"`
|
||||
HPMax int `json:"hp_max"`
|
||||
SkillDesc string `json:"skill_desc"`
|
||||
SkillDescMax string `json:"skill_desc_max"`
|
||||
}
|
||||
|
||||
// ThirdPartyHeroDTO represents a hero from the third-party API.
|
||||
// Note: This is a placeholder structure. Adjust it according to the actual API response.
|
||||
type ThirdPartyHeroDTO struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Rarity int `json:"rarity"`
|
||||
Attribute string `json:"attribute"`
|
||||
Role string `json:"role"`
|
||||
}
|
||||
Reference in New Issue
Block a user