Skip to content

Commit

Permalink
refact(api): remove struct from api
Browse files Browse the repository at this point in the history
  • Loading branch information
Matrix-X committed Jun 22, 2024
1 parent e4d6a1f commit cb3353a
Show file tree
Hide file tree
Showing 46 changed files with 2,055 additions and 400 deletions.
1,312 changes: 1,312 additions & 0 deletions api.csv

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions api/admin/common.api
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ service PowerX {
}

type (
GetUserOptionsRequest struct {
GetUserOptionsRequest {
LikeName string `form:"likeName,optional"`
LikeEmail string `form:"likeEmail,optional"`
LikePhoneNumber string `form:"likePhoneNumber,optional"`
PageIndex int `form:"pageIndex,optional"`
PageSize int `form:"pageSize,optional"`
}

UserOption struct {
UserOption {
Id int64 `json:"id"`
Avatar string `json:"avatar"`
Account string `json:"account"`
Expand All @@ -50,7 +50,7 @@ type (
PhoneNumber string `json:"phoneNumber"`
}

GetUserOptionsReply struct {
GetUserOptionsReply {
List []UserOption `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Expand All @@ -76,19 +76,19 @@ type (
)

type (
GetDepartmentOptionsRequest struct {
GetDepartmentOptionsRequest {
Ids []int64 `form:"ids,optional"`
LikeName string `form:"likeName,optional"`
PageIndex int `form:"pageIndex,optional"`
PageSize int `form:"pageSize,optional"`
}

DepartmentOption struct {
DepartmentOption {
Id int64 `json:"id"`
Name string `json:"name"`
}

GetDepartmentOptionsReply struct {
GetDepartmentOptionsReply {
List []DepartmentOption `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Expand All @@ -97,12 +97,12 @@ type (
)

type (
GetOptionsRequest struct {
GetOptionsRequest {
Type string `form:"type,optional"`
Search string `form:"search,optional"`
}

GetOptionsReply struct {
GetOptionsReply {
Options []map[string]interface{} `json:"options"`
}
)
Expand Down
22 changes: 11 additions & 11 deletions api/admin/crm/business/opportunity.api
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ service PowerX {
}

type (
GetOpportunityListRequest struct {
GetOpportunityListRequest {
Name string `form:"name,optional"`
Source string `form:"source,optional"`
Type string `form:"type,optional"`
Expand All @@ -47,7 +47,7 @@ type (
PageSize int `form:"pageSize,optional"`
}

Opportunity struct {
Opportunity {
Id int64 `json:"id"`
Name string `json:"name"`
Requirement string `json:"requirement"`
Expand All @@ -62,7 +62,7 @@ type (
UpdatedAt string `json:"updatedAt"`
}

GetOpportunityListReply struct {
GetOpportunityListReply {
List []Opportunity `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Expand All @@ -71,7 +71,7 @@ type (
)

type (
CreateOpportunityRequest struct {
CreateOpportunityRequest {
Name string `json:"name"`
Requirement string `json:"requirement"`
CustomerId int64 `json:"customerId"`
Expand All @@ -82,24 +82,24 @@ type (
Stage string `json:"stage"`
}

CreateOpportunityReply struct {
CreateOpportunityReply {
Id int64 `json:"id"`
}
)

type (
AssignUserToOpportunityRequest struct {
AssignUserToOpportunityRequest {
Id int64 `path:"id"`
UserId int64 `json:"userId"`
}

AssignUserToOpportunityReply struct {
AssignUserToOpportunityReply {
Id int64 `json:"id"`
}
)

type (
UpdateOpportunityRequest struct {
UpdateOpportunityRequest {
Id int64 `path:"id"`
Name string `json:"name,optional"`
Requirement string `json:"requirement,optional"`
Expand All @@ -112,17 +112,17 @@ type (
ClosedDate string `json:"closedDate,optional"`
}

UpdateOpportunityReply struct {
UpdateOpportunityReply {
*Opportunity
}
)

type (
DeleteOpportunityRequest struct {
DeleteOpportunityRequest {
Id int64 `path:"id"`
}

DeleteOpportunityReply struct {
DeleteOpportunityReply {
Id int64 `json:"id"`
}
)
20 changes: 10 additions & 10 deletions api/admin/crm/market/brandstory.api
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type (
}
)
type (
ListStoresPageRequest struct {
ListStoresPageRequest {
Ids []int64 `form:"ids,optional"`
LikeName string `form:"likeName,optional"`
OrderBy string `form:"orderBy,optional"`
Expand All @@ -97,7 +97,7 @@ type (
}


ListStoresPageReply struct {
ListStoresPageReply {
List []*Store `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Expand All @@ -106,44 +106,44 @@ type (
)

type (
CreateStoreRequest struct {
CreateStoreRequest {
Store
}

CreateStoreReply struct {
CreateStoreReply {
StoreId int64 `json:"id"`
}
)

type (
GetStoreRequest struct {
GetStoreRequest {
StoreId int64 `path:"id"`
}

GetStoreReply struct {
GetStoreReply {
*Store
}
)


type (
PutStoreRequest struct {
PutStoreRequest {
StoreId int64 `path:"id"`
Store
}

PutStoreReply struct {
PutStoreReply {
*Store
}
)


type (
DeleteStoreRequest struct {
DeleteStoreRequest {
StoreId int64 `path:"id"`
}

DeleteStoreReply struct {
DeleteStoreReply {
StoreId int64 `json:"id"`
}
)
Expand Down
22 changes: 11 additions & 11 deletions api/admin/crm/market/media.api
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ service PowerX {
}

type (
ListMediasPageRequest struct {
ListMediasPageRequest {
MediaTypes []int8 `form:"mediaTypes,optional"`
Keys []string `form:"keys,optional"`
OrderBy string `form:"orderBy,optional"`
PageIndex int `form:"pageIndex,optional"`
PageSize int `form:"pageSize,optional"`
}

Media struct {
Media {
Id int64 `json:"id,optional"`

Title string `json:"title,optional"`
Expand All @@ -60,7 +60,7 @@ type (
DetailImages []*MediaResource `json:"detailImages,optional"`
}

ListMediasPageReply struct {
ListMediasPageReply {
List []*Media `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Expand All @@ -69,42 +69,42 @@ type (
)

type (
CreateMediaRequest struct {
CreateMediaRequest {
Media
}

CreateMediaReply struct {
CreateMediaReply {
MediaId int64 `json:"id"`
}
)

type (
UpdateMediaRequest struct {
UpdateMediaRequest {
MediaId int64 `path:"id"`
Media
}

UpdateMediaReply struct {
UpdateMediaReply {
MediaId int64 `json:"id"`
}
)

type (
GetMediaRequest struct {
GetMediaRequest {
MediaId int64 `path:"id"`
}

GetMediaReply struct {
GetMediaReply {
*Media
}
)

type (
DeleteMediaRequest struct {
DeleteMediaRequest {
MediaId int64 `path:"id"`
}

DeleteMediaReply struct {
DeleteMediaReply {
MediaId int64 `json:"id"`
}
)
22 changes: 11 additions & 11 deletions api/admin/crm/market/mgm.api
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ service PowerX {
}

type (
ListMGMRulesPageRequest struct {
ListMGMRulesPageRequest {
MGMRuleTypes []int8 `form:"mgmTypes,optional"`
Keys []string `form:"keys,optional"`
OrderBy string `form:"orderBy,optional"`
PageIndex int `form:"pageIndex,optional"`
PageSize int `form:"pageSize,optional"`
}

MGMRule struct {
MGMRule {
Id int64 `json:"id,optional"`

Name string `json:"name,optional"`
Expand All @@ -54,7 +54,7 @@ type (
Description string `json:"description,optional"`
}

ListMGMRulesPageReply struct {
ListMGMRulesPageReply {
List []*MGMRule `json:"list"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Expand All @@ -63,42 +63,42 @@ type (
)

type (
CreateMGMRuleRequest struct {
CreateMGMRuleRequest {
MGMRule
}

CreateMGMRuleReply struct {
CreateMGMRuleReply {
MGMRuleId int64 `json:"id"`
}
)

type (
UpdateMGMRuleRequest struct {
UpdateMGMRuleRequest {
MGMRuleId int64 `path:"id"`
MGMRule
}

UpdateMGMRuleReply struct {
UpdateMGMRuleReply {
MGMRuleId int64 `json:"id"`
}
)

type (
GetMGMRuleRequest struct {
GetMGMRuleRequest {
MGMRuleId int64 `path:"id"`
}

GetMGMRuleReply struct {
GetMGMRuleReply {
*MGMRule
}
)

type (
DeleteMGMRuleRequest struct {
DeleteMGMRuleRequest {
MGMRuleId int64 `path:"id"`
}

DeleteMGMRuleReply struct {
DeleteMGMRuleReply {
MGMRuleId int64 `json:"id"`
}
)
Loading

0 comments on commit cb3353a

Please sign in to comment.