完善气站资源列表搜索契约

This commit is contained in:
czl231
2026-08-19 22:07:00 +08:00
parent 72da8e9e47
commit 2f5b934037
10 changed files with 168 additions and 16 deletions

View File

@@ -1,4 +1,6 @@
package gas
package gas
import "git.apinb.com/heqiapp/platforms/backend/api/internal/logic/common"
type ResourceMode string
@@ -10,11 +12,12 @@ const (
)
type ResourceContract struct {
Domain string `json:"domain"`
Name string `json:"name"`
Path string `json:"path"`
PageKind string `json:"pageKind"`
Mode ResourceMode `json:"mode"`
Domain string `json:"domain"`
Name string `json:"name"`
Path string `json:"path"`
PageKind string `json:"pageKind"`
Mode ResourceMode `json:"mode"`
SearchFields []common.KeywordSearchField `json:"searchFields,omitempty"`
}
func ExpectedResources() []ResourceContract {
@@ -39,6 +42,7 @@ func ExpectedResources() []ResourceContract {
for _, item := range items {
result = append(result, ResourceContract{
Domain: item.domain, Name: item.name, Path: "/" + item.name, PageKind: "list", Mode: item.mode,
SearchFields: resourceSearchFields(item.name),
})
}
return result