完善气站资源列表搜索契约
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user