fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
syntax = "v1"
|
||||
|
||||
import (
|
||||
"base.api"
|
||||
)
|
||||
|
||||
type (
|
||||
// 机床列表响应
|
||||
MachineListReply {
|
||||
Id int `json:"id"`
|
||||
No int `json:"machineNo"`
|
||||
Name string `json:"name"`
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
QueryMachinesReq {
|
||||
PageReq
|
||||
Keyword string `form:"keyword,optional"`
|
||||
}
|
||||
|
||||
MachineReply {
|
||||
Id int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
IpAddress string `json:"ipAddress"`
|
||||
Location string `json:"location"`
|
||||
Status string `json:"status"`
|
||||
Remark string `json:"remark"`
|
||||
SlotCount int `json:"slotCount"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
UpdatedAt int64 `json:"updatedAt"`
|
||||
}
|
||||
|
||||
QueryMachinesReply {
|
||||
PageReply
|
||||
Data []MachineReply `json:"data"`
|
||||
}
|
||||
)
|
||||
|
||||
@server (
|
||||
jwt: Auth
|
||||
group: machine
|
||||
prefix: /api/v1
|
||||
)
|
||||
service hougai-api {
|
||||
@doc "获取机床列表"
|
||||
@handler listMachines
|
||||
get /machines/list returns ([]MachineListReply)
|
||||
|
||||
@doc "分页查询机床列表"
|
||||
@handler queryMachines
|
||||
get /machines (QueryMachinesReq) returns (QueryMachinesReply)
|
||||
|
||||
@doc "获取机床详情"
|
||||
@handler getMachine
|
||||
get /machines/:id (PathId) returns (MachineReply)
|
||||
}
|
||||
Reference in New Issue
Block a user