You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1187 lines
26 KiB

syntax = "proto3";
import "validate/validate.proto";
import "google/api/annotations.proto";
import "google/protobuf/wrappers.proto";
package api.answer;
option go_package = "v1/;answer";
service Answer{
//问题类型
rpc listCategory(listCategoryRequest)returns(listCategoryResponse){
option (google.api.http) = {
get: "/api/v1/answer/listCategory"
};
}
//问题列表
rpc listQuestionPage(listQuestionPageRequest)returns(listQuestionPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/listQuestionPage"
};
}
//Answer of the day
rpc listAnswerOfTheDay(listAnswerOfTheDayRequest)returns(listAnswerOfTheDayResponse){
option(google.api.http) = {
get:"/api/v1/answer/listAnswerOfTheDay"
};
}
//个人信息card
rpc userRightInfo(userRightInfoRequest)returns(userRightInfoResponse){
option(google.api.http) = {
get:"/api/v1/answer/userRightInfo"
};
}
//hot/top用户
rpc listHotTopUser(listHotTopUserRequest)returns(listHotTopUserResponse){
option(google.api.http) = {
get:"/api/v1/answer/listHotTopUser"
};
}
//问题搜索页面
rpc searchQuestion(searchQuestionRequest)returns(searchQuestionResponse){
option(google.api.http) = {
get:"/api/v1/answer/searchQuestion"
};
}
//问题联想
rpc listFilterQuestion(listFilterQuestionRequest)returns(listFilterQuestionResponse){
option(google.api.http) = {
get:"/api/v1/answer/listFilterQuestion"
};
}
//用户联想
rpc listFilterUser(listFilterUserRequest)returns(listFilterUserResponse){
option(google.api.http) = {
get:"/api/v1/answer/listFilterUser"
};
}
//推荐问题
rpc listRelatedQuestions(listRelatedQuestionsRequest)returns(listRelatedQuestionsResponse){
option(google.api.http) = {
get:"/api/v1/answer/listRelatedQuestions"
};
}
//问题详情页
rpc questionDetailPage(questionDetailPageRequest)returns(questionDetailPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/questionDetailPage"
};
}
//用户中心
rpc userCenterProfilePage(userCenterProfilePageRequest)returns(userCenterProfilePageResponse){
option(google.api.http) = {
get:"/api/v1/answer/userCenterProfilePage"
};
}
rpc userCenterEditPage(userCenterEditPageRequest)returns(userCenterEditPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/userCenterEditPage"
};
}
rpc userCenterEdit(userCenterEditRequest)returns(userCenterEditResponse){
option(google.api.http) = {
post:"/api/v1/answer/userCenterEdit"
body:"*",
};
}
rpc userCenterInBoxPage(userCenterInBoxPageRequest)returns(userCenterInBoxPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/userCenterInBoxPage"
};
}
rpc deleteInbox(deleteInboxRequest)returns(deleteInboxResponse){
option(google.api.http) = {
post:"/api/v1/answer/deleteInbox",
body:"*",
};
}
rpc messageSend(messageSendRequest)returns(messageSendResponse){
option(google.api.http) = {
post:"/api/v1/answer/messageSend",
body:"*",
};
}
rpc messageDetailPage(messageDetailPageRequest)returns(messageDetailPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/messageDetailPage",
};
}
rpc userCenterPointsPage(userCenterPointsPageRequest)returns(userCenterPointsPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/userCenterPointsPage"
};
}
rpc userCenterNewAnswersPage(userCenterNewAnswersPageRequest)returns(userCenterNewAnswersPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/userCenterNewAnswersPage"
};
}
rpc userCenterNewCommentsPage(userCenterNewCommentsPageRequest)returns(userCenterNewCommentsPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/userCenterNewCommentsPage"
};
}
rpc noticesPage(noticesPageRequest)returns(noticesPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/noticesPage"
};
}
rpc captcha(captchaRequest)returns(captchaResponse){
option(google.api.http) = {
get:"/api/v1/answer/captcha"
};
}
rpc forbiddenQuestion(forbiddenQuestionRequest)returns(forbiddenQuestionResponse){
option(google.api.http) = {
post:"/api/v1/answer/forbiddenQuestion",
body:"*",
};
}
rpc addQuestion(addQuestionRequest)returns(addQuestionResponse){
option(google.api.http) = {
post:"/api/v1/answer/addQuestion",
body:"*",
};
}
rpc getEditQuestion(getEditQuestionRequest)returns(getEditQuestionResponse){
option(google.api.http) = {
get:"/api/v1/answer/getEditQuestion",
};
}
rpc addAnswer(addAnswerRequest)returns(addAnswerResponse){
option(google.api.http) = {
post:"/api/v1/answer/addAnswer",
body:"*",
};
}
rpc editUserLogo(editUserLogoRequest)returns(editUserLogoResponse){
option(google.api.http) = {
post:"/api/v1/answer/editUserLogo",
body:"*",
};
}
rpc deleteNode(deleteNodeRequest)returns(deleteNodeResponse){
option(google.api.http) = {
post:"/api/v1/answer/deleteNode",
body:"*",
};
}
rpc report(reportRequest)returns(reportResponse){
option(google.api.http) = {
post:"/api/v1/answer/report",
body:"*",
};
}
rpc forwardQuestion(forwardQuestionRequest)returns(forwardQuestionResponse){
option(google.api.http) = {
post:"/api/v1/answer/forwardQuestion",
body:"*",
};
}
rpc voteNodeGood(voteNodeGoodRequest)returns(voteNodeGoodResponse){
option(google.api.http) = {
post:"/api/v1/answer/voteNodeGood",
body:"*",
};
}
rpc login(loginRequest)returns(loginResponse){
option(google.api.http) = {
post:"/api/v1/answer/login",
body:"*",
};
}
rpc adminRolesPage(adminRolesPageRequest)returns(adminRolesPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/adminRolesPage",
};
}
rpc adminUpdateRoleAction(adminUpdateRoleActionRequest)returns(adminUpdateRoleActionResponse){
option(google.api.http) = {
post:"/api/v1/answer/adminUpdateRoleAction",
body:"*",
};
}
rpc adminUserPage(adminUserPageRequest)returns(adminUserPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/adminUserPage",
};
}
rpc adminUpdateUserAction(adminUpdateUserActionRequest)returns(adminUpdateUserActionResponse){
option(google.api.http) = {
post:"/api/v1/answer/adminUpdateUserAction",
body:"*",
};
}
rpc adminNodePage(adminNodePageRequest)returns(adminNodePageResponse){
option(google.api.http) = {
get:"/api/v1/answer/adminNodePage",
};
}
rpc updateNode(updateNodeRequest)returns(updateNodeResponse){
option(google.api.http) = {
post:"/api/v1/answer/updateNode",
body:"*",
};
}
rpc helpPage(helpPageRequest)returns(helpPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/helpPage",
};
}
rpc randQuestion(randQuestionRequest)returns(randQuestionResponse){
option(google.api.http) = {
get:"/api/v1/answer/randQuestion",
};
}
rpc exchange(exchangeRequest)returns(exchangeResponse){
option(google.api.http) = {
get:"/api/v1/answer/exchange",
};
}
rpc adminExchange(adminExchangeRequest)returns(adminExchangeResponse){
option(google.api.http) = {
get:"/api/v1/answer/adminExchange",
};
}
rpc exchangeAction(exchangeActionRequest)returns(exchangeActionResponse){
option(google.api.http) = {
post:"/api/v1/answer/exchangeAction",
body:"*",
};
}
rpc adminPointsPage(adminPointsPageRequest)returns(adminPointsPageResponse){
option(google.api.http) = {
get:"/api/v1/answer/adminPointsPage",
};
}
rpc adminAddPointAction(adminAddPointActionRequest)returns(adminAddPointActionResponse){
option(google.api.http) = {
post:"/api/v1/answer/adminAddPointAction",
body:"*",
};
}
rpc redirect(redirectRequest)returns(redirectResponse){
option(google.api.http) = {
get:"/api/v1/answer/redirect",
};
}
rpc clearCheckTimeAction(clearCheckTimeActionRequest)returns(clearCheckTimeActionResponse){
option(google.api.http) = {
post:"/api/v1/answer/clearCheckTimeAction",
body:"*",
};
}
rpc adminSearchHelp(adminSearchHelpRequest)returns(adminSearchHelpResponse){
option(google.api.http) = {
get:"/api/v1/answer/adminSearchHelp",
};
}
rpc adminAddHelp(adminAddHelpRequest)returns(adminAddHelpResponse){
option(google.api.http) = {
post:"/api/v1/answer/adminAddHelp",
body:"*",
};
}
rpc adminGetHelp(adminGetHelpRequest)returns(adminGetHelpResponse){
option(google.api.http) = {
get:"/api/v1/answer/adminGetHelp",
};
}
rpc adminDeleteHelp(adminDeleteHelpRequest)returns(adminDeleteHelpResponse){
option(google.api.http) = {
post:"/api/v1/answer/adminDeleteHelp",
body:"*",
};
}
//===
rpc adminSearchExchange(adminSearchExchangeRequest)returns(adminSearchExchangeResponse){
option(google.api.http) = {
get:"/api/v1/answer/adminSearchExchange",
};
}
rpc adminAddExchange(adminAddExchangeRequest)returns(adminAddExchangeResponse){
option(google.api.http) = {
post:"/api/v1/answer/adminAddExchange",
body:"*",
};
}
rpc adminDeleteExchange(adminDeleteExchangeRequest)returns(adminDeleteExchangeResponse){
option(google.api.http) = {
post:"/api/v1/answer/adminDeleteExchange",
body:"*",
};
}
}
//首页问题类型
message listCategoryRequest {
int32 cityId = 1[(validate.rules).int32.gte = 0];
string listType = 2[(validate.rules).string.pattern = "^(alatest|latest|noanswer|manswer)$"];
}
message listCategoryResponseItem{
string title = 1;
string url = 2;
bool isNew = 3;
int32 num = 4;
}
message listCategoryResponse{
repeated listCategoryResponseItem list = 1;
}
//问题列表
message listQuestionPageRequest{
string questionType = 1;
int32 cityId = 2;
int32 categoryId = 3;
int32 page = 4;
int32 createDay = 5;
}
message listQuestionPageResponseItem{
int32 userId = 1;
string userLogo = 2;
int32 userLevel = 3;
string userName = 4;
string title = 5;
string url = 6;
string lastTimeTitle = 7;
string lastTimeTitleUrl = 8;
string city = 9;
string cityUrl = 10;
string category = 11;
string categoryUrl = 12;
int32 answerCount = 13;
int32 viewCount = 14;
int32 commentCount = 15;
bool isNew = 16;
}
message listQuestionPageResponse{
repeated listQuestionPageResponseItem list = 1;
int32 count = 2;
}
//
message listAnswerOfTheDayRequest{
int32 page = 1;
int32 size = 2[(validate.rules).int32 = {in:[1, 20]}];
}
message listAnswerOfTheDayResponseItem {
string title = 1;
string url = 2;
string postTime = 3;
string content = 4;
string answeredName = 5;
string shortContent = 6;
}
message listAnswerOfTheDayResponse{
repeated listAnswerOfTheDayResponseItem list = 1;
int32 num = 2;
}
//userRightInfoRequest
message userRightInfoRequest{
}
message userRightInfoResponse{
int32 userId = 1;
string userName = 2;
string photo = 3;
int32 point = 4;
int32 messageCount = 5;
int32 newNotice = 6;
int32 newAnswer = 7;
int32 newComment = 8;
int32 userLevel = 9;
int32 adminLevel = 10;
string email = 11;
}
message listHotTopUserRequest{
}
message listHotTopUserResponseItem{
string name = 1;
string photo = 2;
int32 userId = 3;
}
message listHotTopUserResponse{
repeated listHotTopUserResponseItem hots = 1;
repeated listHotTopUserResponseItem tops = 2;
int32 guestCount = 3;
}
message listFilterQuestionRequest{
string title = 1[(validate.rules).string.min_len = 1];
}
message listFilterQuestionResponseItem{
string title = 1;
string url = 2;
}
message listFilterQuestionResponse{
repeated listFilterQuestionResponseItem list = 1;
}
///
message listFilterUserRequest{
string user = 1[(validate.rules).string.min_len = 1];
}
message listFilterUserResponseItem{
int32 userId = 1;
string userName = 2;
}
message listFilterUserResponse{
repeated listFilterUserResponseItem list = 1;
}
//
message listRelatedQuestionsRequest{
int32 cityId = 1;
int32 categoryId = 2;
}
message listRelatedQuestionsResponseItem{
string title = 1;
string url = 2;
string postTime = 3;
}
message listRelatedQuestionsResponse{
repeated listRelatedQuestionsResponseItem list = 1;
}
//
message searchQuestionRequest{
string keyword = 1;
int32 page = 2;
}
message searchQuestionResponseItem{
int32 userId = 1;
string userLogo = 2;
string userName = 4;
string title = 5;
string url = 6;
string postTime = 7;
string city = 9;
string cityUrl = 10;
string category = 11;
string categoryUrl = 12;
int32 answerCount = 13;
string content = 3;
}
message searchQuestionResponse{
repeated searchQuestionResponseItem list = 1;
int32 count = 2;
}
//
message questionDetailPageRequest{
string aliasKey = 1;
int32 nodeId = 2;
int32 page = 3;
}
message questionDetailPageResponseItemVote{
int32 good = 1;
int32 bad = 2;
int32 vote = 3;
// 0没有点赞 点赞过 1 good 2 bad
int32 status = 4;
}
message questionDetailPageResponseItemUser{
string logo = 1;
string name = 2;
int32 postNum = 3;
int32 level = 4;
int32 userId = 5;
bool isAnonymous = 6;
string signature = 7;
}
message questionDetailPageResponseItemQuestionItem{
bool forbidden = 1;
string city = 2;
string cityUrl = 3;
string category = 4;
string categoryUrl = 5;
string title = 6;
int32 cityId = 7;
int32 categoryId = 8;
}
message questionDetailPageResponseItem{
int32 id = 1;
bool canManage = 2;
string content = 3;
bool isDel = 4;
string postTime = 5;
int32 commentNum = 6;
questionDetailPageResponseItemVote vote = 7;
questionDetailPageResponseItemUser user = 8;
questionDetailPageResponseItemQuestionItem question = 9;
repeated questionDetailPageResponseItem comments = 10;
}
message questionDetailPageResponse{
questionDetailPageResponseItem question = 1;
questionDetailPageResponseItem highestVoted = 2;
repeated questionDetailPageResponseItem answers = 3;
int32 answerCount = 4;
int32 commentCount = 5;
}
message userCenterProfilePageRequest{
int32 userId = 1[(validate.rules).int32.gte = 1];
int32 questionPage = 2;
int32 answerPage = 3;
}
message userCenterProfilePageResponseItem{
string title = 1;
string postTime = 2;
string answerNum = 3;
string url = 4;
bool isDel = 5;
}
message userCenterProfilePageResponse{
bool online = 1;
string userName = 2;
string photo = 3;
int32 point = 4;
string registerTime = 5;
int32 userLevel = 6;
string aboutMe = 7;
string interests = 8;
string skype = 9;
string email = 10;
string google = 11;
int32 questionCount = 12;
repeated userCenterProfilePageResponseItem questions = 13;
int32 answerCount = 14;
repeated userCenterProfilePageResponseItem answers = 15;
}
message userCenterEditPageRequest{
int32 userId = 1;
}
message userCenterEditPageData {
string signature = 1;
string aboutMe = 2;
string interests = 3;
string email = 5;
string google = 6;
string skype = 7;
bool isPlainText = 8;
bool isNotify = 9;
int32 userId = 4;
}
message userCenterEditPageResponse{
userCenterEditPageData data = 1;
}
message userCenterEditRequest{
userCenterEditPageData data = 1;
int32 userId = 2;
}
message userCenterEditResponse{
}
//
message userCenterInBoxPageRequest{
int32 userId = 1;
int32 page = 2;
}
message userCenterInBoxPageResponseItem{
int32 id = 1;
string userName = 2;
int32 userId = 3;
bool isNew = 4;
string subject = 5;
string lastTime = 6;
}
message userCenterInBoxPageResponse{
repeated userCenterInBoxPageResponseItem list = 1;
int32 count = 2;
}
//
message deleteInboxRequest{
int32 userId = 1;
repeated int32 ids = 2;
}
message deleteInboxResponse{
}
message messageSendRequest{
repeated int32 userIds = 1;
string subject = 2;
string content = 3 [(validate.rules).string.min_len = 1];
//消息ThreadId
int32 threadId = 4;
}
message messageSendResponse{
int32 id = 1;
}
message messageDetailPageRequest{
int32 messageId = 1;
int32 page = 2;
}
message messageDetailPageResponseItem{
int32 userId = 1;
string photo = 2;
string userName = 3;
string postTime = 4;
int32 id = 5;
string content = 6;
bool isNew = 7;
}
message messageDetailPageResponse{
repeated messageDetailPageResponseItem list = 1;
string fromName = 2;
int32 count = 3;
int32 threadId = 4;
}
message userCenterPointsPageRequest{
int32 userId = 1;
int32 page = 2;
}
message userCenterPointsPageResponseItem{
int32 point = 1;
string url = 2;
string doTime = 3;
string pointType = 4;
int32 id = 5;
}
message userCenterPointsPageResponse{
repeated userCenterPointsPageResponseItem list = 1;
int32 count = 2;
int32 allPoints = 3;
}
message userCenterNewAnswersPageRequest{
int32 userId = 1;
int32 page = 2;
}
message userCenterNewAnswersPageResponseItem{
int32 userId = 1;
string userName = 2;
string logo = 3;
string answer = 4;
string answerTime = 5;
string answerUrl = 6;
string questionUrl = 7;
string question = 8;
int32 id = 9;
}
message userCenterNewAnswersPageResponse{
repeated userCenterNewAnswersPageResponseItem list = 1;
int32 count = 2;
}
message userCenterNewCommentsPageRequest{
int32 page = 1;
int32 userId = 2;
}
message userCenterNewCommentsPageResponseItem{
int32 userId = 1;
string userName = 2;
string logo = 3;
string comment = 4;
string commentTime = 5;
string commentUrl = 6;
string answer = 7;
string answerUrl = 8;
int32 answeredId = 9;
int32 id = 10;
}
message userCenterNewCommentsPageResponse{
repeated userCenterNewCommentsPageResponseItem list = 1;
int32 count = 2;
}
message captchaRequest{
}
message captchaResponse{
string key = 1;
string val = 2;
}
message noticesPageRequest{
int32 page = 1[(validate.rules).int32.gte = 0];
}
message noticesPageResponseItem{
string title = 1;
string postTime = 2;
string content = 3;
int32 id = 4;
}
message noticesPageResponse{
repeated noticesPageResponseItem list = 1;
int32 count = 2;
}
message forbiddenQuestionRequest{
int32 questionId = 1;
bool isForbidden = 2;
}
message forbiddenQuestionResponse{
bool isForbidden = 1;
}
message addQuestionRequest{
string title = 1[(validate.rules).string = {min_len:1,max_len:100}];
string content = 2[(validate.rules).string = {min_len:1}];
int32 categoryId = 3[(validate.rules).int32.gte = 1];
int32 cityId = 4[(validate.rules).int32.gte = 1];
int32 id = 5;
int32 userId = 6[(validate.rules).int32.gte = 1];
}
message addQuestionResponse{
string url = 1;
}
message getEditQuestionRequest{
int32 nid = 1[(validate.rules).int32.gte = 1];
}
message getEditQuestionResponse{
string title = 1;
string content = 2;
int32 categoryId = 3;
int32 cityId = 4;
int32 id = 5;
bool isAnswer = 6;
}
message editUserLogoRequest{
string imageData = 1;
int32 userId = 2;
}
message editUserLogoResponse{
string url = 1;
}
message deleteNodeRequest{
int32 nodeId = 1[(validate.rules).int32.gte = 1];
string reasonTitle = 2[(validate.rules).string.min_len = 1];
string reasonBody = 3[(validate.rules).string.min_len = 1];
}
message deleteNodeResponse{
}
message reportRequest{
int32 nodeId = 1[(validate.rules).int32.gte = 1];
string content = 2[(validate.rules).string.min_len = 1];
string code = 3[(validate.rules).string.len = 4];
string codeKey = 4[(validate.rules).string.min_len = 1];
string type = 5[(validate.rules).string.pattern = "^(question|answer|comment|message|notice)$"];
}
message reportResponse{
}
message forwardQuestionRequest{
int32 nodeId = 1[(validate.rules).int32.gte = 1];
string content = 2[(validate.rules).string.min_len = 1];
string originalContent = 3[(validate.rules).string.min_len = 1];
string sendTo = 4[(validate.rules).string.min_len = 1];
}
message forwardQuestionResponse{
}
message addAnswerRequest{
int32 id = 1;
int32 parentId = 2;//编辑时不填
string title = 3;
string content = 4[(validate.rules).string.min_len = 1];
}
message addAnswerResponse{
}
message voteNodeGoodRequest{
int32 nodeId = 1;
bool isGood = 2;
}
message voteNodeGoodResponse{
}
message loginRequest{
string loginType = 1;
string userName = 2;
string password = 3;
string code = 4;
}
message loginResponse{
string code = 1;
}
message adminRolesPageRequest{
}
message adminRolesPageResponseItem{
string name = 1;
int32 id = 2;
bool isBlock = 3;
}
message adminRolesPageResponse{
repeated adminRolesPageResponseItem list = 1;
int32 count = 2;
}
message adminUpdateRoleActionRequest{
string title = 1;
int32 id = 2;
}
message adminUpdateRoleActionResponse{
}
message adminUserPageRequest{
int32 roleId = 1;
int32 status = 2;
string createdStart = 3;
string createdEnd = 4;
string loginStart = 5;
string loginEnd = 6;
string email = 7;
int32 userId = 8;
string name = 9;
int32 page = 10;
}
message adminUserPageResponseItem{
int32 id = 1;
string name = 2;
string status = 3;
repeated int32 roles = 4;
string registerTime = 5;
string lastTime = 6;
}
message adminUserPageResponse{
repeated adminUserPageResponseItem list = 1;
int32 count = 2;
}
//
message adminUpdateUserActionRequest{
int32 userId = 1;
google.protobuf.Int32Value status = 2;
repeated google.protobuf.Int32Value roleIds = 3;
}
message adminUpdateUserActionResponse{
}
message adminNodePageRequest{
int32 status = 1;
// 1 answer 2 question
int32 type = 2;
int32 page = 4;
string createdStart = 5;
string createdEnd = 6;
string title = 7;
string name = 8;
int32 userId = 9;
}
message adminNodePageResponseItem {
int32 id = 1;
string title = 2;
string type = 3;
int32 userId = 4;
string userName = 5;
int32 status = 6;
string url = 7;
int32 promote = 8;
int32 sticky = 9;
string reason = 10;
string postTime = 11;
string changedTime = 12;
}
message adminNodePageResponse{
repeated adminNodePageResponseItem list = 1;
int32 count = 2;
}
message updateNodeRequest{
google.protobuf.Int32Value status = 1;
google.protobuf.Int32Value promote = 2;
google.protobuf.Int32Value sticky = 3;
repeated int32 nodeIds = 4;
}
message updateNodeResponse{
}
message helpPageRequest{
string urlKey = 1[(validate.rules).string.min_len = 1];
}
message helpPageResponseItem {
string title = 1;
string url = 2;
repeated helpPageResponseItem children = 3;
int32 pid = 4;
}
message helpPageResponse{
repeated helpPageResponseItem menus = 1;
string content = 2;
string title = 3;
}
message randQuestionRequest{
}
message randQuestionResponse{
string url = 1;
}
message exchangeRequest{
}
message exchangeResponseItem{
string title = 1;
string content = 2;
int32 point = 3;
string image = 4;
int32 id = 5;
}
message exchangeResponse{
repeated exchangeResponseItem list = 1;
}
message adminExchangeRequest{
int32 page = 1;
}
message adminExchangeResponseItem{
int32 id = 1;
string type = 2;
string name = 3;
int32 userId = 4;
int32 points = 5;
string email = 6;
string addressCode = 7;
string address = 8;
string other = 9;
string createdTime = 10;
}
message adminExchangeResponse{
repeated adminExchangeResponseItem list = 1;
int32 count = 2;
}
message exchangeActionRequest{
int32 id = 1[(validate.rules).int32.gte = 1];
string name = 3[(validate.rules).string.min_len = 1];
string email = 6[(validate.rules).string.min_len = 1];
string addressCode = 7;
string address = 8[(validate.rules).string.min_len = 1];
string other = 9;
}
message exchangeActionResponse{
}
message adminPointsPageRequest{
int32 userId = 1;
int32 typeId = 2;
int32 page = 3;
string startTime = 4;
string endTime = 5;
}
message adminPointsPageResponseItem{
int32 id = 1;
int32 userId = 2;
int32 point = 3;
string createdTime = 4;
int32 typeId = 5;
string url = 6;
string userName = 7;
}
message adminPointsPageResponse{
repeated adminPointsPageResponseItem list = 1;
int32 count = 2;
}
//query: INSERT INTO userpoints_txn (uid, approver_uid, points, time_stamp, changed, status, description, reference, expirydate, expired, parent_txn_id, tid, entity_id, operation) VALUES (1, 0, 100000, 1658815066, 1658815066, 0, 'desc', '111111', 0, 0, 0, 16, 0, 'admin')
//query: UPDATE userpoints SET points = 100010, max_points = 100012, last_update = 1658815066 WHERE uid = 1 AND tid = 16
message adminAddPointActionRequest{
int32 userId = 1[(validate.rules).int32.gte = 1];
int32 point = 2[(validate.rules).int32.gte = 1];
int32 typeId = 3[(validate.rules).int32.gte = 1];
string description = 4;
int32 entryId = 5;
}
message adminAddPointActionResponse{
}
message redirectRequest{
int32 id = 1[(validate.rules).int32.gte = 1];
string type = 2[(validate.rules).string.min_len = 1];
}
message redirectResponse{
string url = 1;
}
message clearCheckTimeActionRequest{
int32 typeId = 1;
}
message clearCheckTimeActionResponse{
}
message adminAddHelpRequest{
int32 id = 1;
string title = 2[(validate.rules).string.min_len = 1];
string url = 3;
int32 parentId = 4;
int32 sort = 5;
string content = 6;
}
message adminAddHelpResponse{
int32 id = 1;
}
message adminSearchHelpRequest{
int32 status = 1;
int32 page = 2;
}
message adminSearchHelpResponseItem{
int32 id = 1;
string title = 2;
string url = 3;
int32 sort = 4;
int32 status = 5;
}
message adminSearchHelpResponse{
repeated adminSearchHelpResponseItem list = 1;
int32 num = 2;
}
message adminGetHelpRequest{
int32 id = 1;
}
message adminGetHelpResponseItem{
int32 id = 1;
string title = 2;
int32 sort = 3;
string content = 4;
}
message adminGetHelpResponse{
int32 id = 1;
string title = 2;
string url = 3;
int32 sort = 4;
repeated adminGetHelpResponseItem list = 5;
}
message adminDeleteHelpRequest{
int32 id = 1;
int32 status = 2;
}
message adminDeleteHelpResponse{
}
message adminSearchExchangeRequest{
int32 status = 1;
int32 page = 2;
}
message adminSearchExchangeResponseItem{
int32 id = 1;
string title = 2;
string content = 3;
string picture = 4;
int32 point = 5;
int32 status = 6;
}
message adminSearchExchangeResponse{
repeated adminSearchExchangeResponseItem list = 1;
int32 count = 2;
}
message adminAddExchangeRequest{
int32 id = 1;
string title = 2;
string content = 3;
string picture = 4;
int32 point = 5;
}
message adminAddExchangeResponse{
}
message adminDeleteExchangeRequest{
int32 id = 1;
int32 status = 2;
}
message adminDeleteExchangeResponse{
repeated bytes a = 1;
int32 b = 2;
map<string, int32>c = 3;
bytes ad=4;
}