初始化项目

This commit is contained in:
lianghuanjie
2024-12-05 20:51:35 +08:00
commit e2ba6924b8
30 changed files with 1560 additions and 0 deletions

46
doc/api/nova-task.api Normal file
View File

@@ -0,0 +1,46 @@
syntax = "v1"
@server (
prefix: /api/task/v1
group: task
jwt: Auth
)
service novatask {
@doc "获取任务列表"
@handler GetTaskList
get /tasks (GetTaskListReq) returns (GetTaskListResp)
@doc "领取任务奖励"
@handler GetTaskReward
get /reward/:id (GetTaskRewardReq) returns (GetTaskRewardResp)
}
type GetTaskListReq {
CommunityId uint `form:"community_id"`
}
type Task {
Id uint `json:"id"`
Title string `json:"title"`
SubTitle string `json:"sub_title"`
Description string `json:"description"`
Points int `json:"points"`
ButtonText string `json:"button_text"`
Type int8 `json:"type"`
StartAt string `json:"start_at"`
EndAt string `json:"end_at"`
Status int8 `json:"status"`
}
type GetTaskListResp {
Tasks []Task `json:"tasks"`
}
type GetTaskRewardReq {
ID uint `path:"id"`
}
type GetTaskRewardResp {
Points int `json:"points"`
}