Files
hldrCenter/server/api/devproject.api
2025-10-27 09:40:36 +08:00

51 lines
2.3 KiB
Plaintext
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.
// 数据模型定义:对应表字段结构
type DevProject {
Id int64 `json:"id"` // 基地开放项目ID主键
BasicDevProjectManagementSystem string `json:"basic_dev_project_management_system"` // 基础开发项目管理制度markdown
BasicDevProjectInitiationResult string `json:"basic_dev_project_initiation_result"` // 基础开发项目立项结果markdown
BasicDevProjectMidtermInspection string `json:"basic_dev_project_midterm_inspection"` // 基础开发项目中期检查markdown
BasicDevProjectAchievements string `json:"basic_dev_project_achievements"` // 基础开发项目成果markdown
}
// 新增/修改请求参数ID存在则更新不存在则新增
type SaveDevProjectReq {
Id int64 `json:"id,omitempty"` // 可选更新时需传入ID
BasicDevProjectManagementSystem string `json:"basic_dev_project_management_system"` // 基础开发项目管理制度
BasicDevProjectInitiationResult string `json:"basic_dev_project_initiation_result"` // 基础开发项目立项结果
BasicDevProjectMidtermInspection string `json:"basic_dev_project_midterm_inspection"` // 基础开发项目中期检查
BasicDevProjectAchievements string `json:"basic_dev_project_achievements"` // 基础开发项目成果
}
// 新增/修改响应结果
type SaveDevProjectResp {
Success bool `json:"success"` // 操作是否成功
Msg string `json:"message"` // 提示信息
Id int64 `json:"id,omitempty"` // 新增时返回生成的ID
}
// 查询请求参数按ID查询
type GetDevProjectReq {
Id int64 `json:"id" form:"id" validate:"required"` // 基地开放项目ID必传
}
// 查询响应结果
type GetDevProjectResp {
DevProject DevProject `json:"dev_project"` // 项目详情
Msg string `json:"message"` // 提示信息
}
@server (
group: devproject // 接口分组:基地开放项目
prefix: /api/devproject
)
service devproject-api {
// 新增或修改项目POST请求支持新增和更新
@handler SaveDevProjectHandler
post /devproject/save (SaveDevProjectReq) returns (SaveDevProjectResp)
// 查询项目详情GET请求按ID查询
@handler GetDevProjectHandler
get /devproject/get (GetDevProjectReq) returns (GetDevProjectResp)
}