syntax = "v1"

info(
    title: "xx实例"
    desc: "xx实例"
    author: "author"
    email: "email"
    version: "v1"
)

@server(
    prefix: role/v1
    group: role
    jwt: JwtAuth
)
service Core {
    @handler getRole
    post /role/:id (RoleGetRequest) returns (RoleGetResponse)
    @handler saveRole
    post /role (RoleSaveRequest) returns (RoleSaveResponse)
    @handler deleteRole
    delete /role/:id (RoleDeleteRequest) returns (RoleDeleteResponse)
    @handler updateRole
    put /role/:id (RoleUpdateRequest) returns (RoleUpdateResponse)
    @handler searchRole
    post /role/search (RoleSearchRequest) returns (RoleSearchResponse)
}

type (
    RoleGetRequest {
		Id int64 `path:"id"`
	}
    RoleGetResponse struct{
		Role RoleItem `json:"role"`
    }

	RoleSaveRequest struct{
		Role RoleItem `json:"role"`
    }
    RoleSaveResponse struct{}

	RoleDeleteRequest struct{
        Id int64 `path:"id"`
    }
    RoleDeleteResponse struct{}

	RoleUpdateRequest struct{
		Id int64 `path:"id"`
        Role RoleItem `json:"role"`
    }
    RoleUpdateResponse struct{}

 	RoleSearchRequest struct{
         Page int  `json:"page"`
         Size int  `json:"size"`
    }
    RoleSearchResponse{
        List []RoleItem  `json:"list"`
        Total int64 `json:"total"`
    }
	RoleItem struct{
	
	}
)