feat: 迁移plant
This commit is contained in:
@@ -54,6 +54,33 @@ message UpdateProfileReq {
|
||||
string avatarId = 3;
|
||||
}
|
||||
|
||||
// 我的徽章
|
||||
message UserBadgeInfo {
|
||||
string id = 1;
|
||||
string badgeId = 2;
|
||||
string badgeName = 3;
|
||||
string dimension = 4;
|
||||
int32 tier = 5;
|
||||
string awardedAt = 6;
|
||||
}
|
||||
|
||||
message UserBadgeListResp {
|
||||
repeated UserBadgeInfo list = 1;
|
||||
}
|
||||
|
||||
// 我的收藏
|
||||
message UserStarInfo {
|
||||
string id = 1;
|
||||
string targetId = 2;
|
||||
string type = 3;
|
||||
string createdAt = 4;
|
||||
}
|
||||
|
||||
message UserStarListResp {
|
||||
repeated UserStarInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
// ========== 我的植物 ==========
|
||||
|
||||
message PlantInfo {
|
||||
@@ -113,7 +140,7 @@ message PlantDetailResp {
|
||||
repeated GrowthRecordInfo growthRecords = 3;
|
||||
}
|
||||
|
||||
// ========== 养护计划 ==========
|
||||
// ========== 养护计划/任务 ==========
|
||||
|
||||
message CarePlanInfo {
|
||||
string id = 1;
|
||||
@@ -133,6 +160,23 @@ message AddCarePlanReq {
|
||||
int32 period = 6;
|
||||
}
|
||||
|
||||
// 养护任务 status: 1=待完成 2=已完成 3=已过期
|
||||
message CareTaskInfo {
|
||||
string id = 1;
|
||||
string plantId = 2;
|
||||
string planId = 3;
|
||||
string name = 4;
|
||||
string icon = 5;
|
||||
string targetAction = 6;
|
||||
string dueDate = 7;
|
||||
int32 status = 8;
|
||||
}
|
||||
|
||||
message CareTaskListResp {
|
||||
repeated CareTaskInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
// ========== 养护记录 ==========
|
||||
|
||||
message AddCareRecordReq {
|
||||
@@ -173,6 +217,27 @@ message WikiInfo {
|
||||
string lightIntensity = 9;
|
||||
string optimalTempPeriod = 10;
|
||||
int64 createdAt = 11;
|
||||
string classId = 12;
|
||||
string distributionArea = 13;
|
||||
string lifeCycle = 14;
|
||||
repeated string classIds = 15;
|
||||
repeated string ossIds = 16;
|
||||
repeated string relatedWikiIds = 17;
|
||||
bool isVectorSynced = 18;
|
||||
bool isStar = 19;
|
||||
string reproductionMethod = 20;
|
||||
string pestsDiseases = 21;
|
||||
string lightType = 22;
|
||||
string stem = 23;
|
||||
string fruit = 24;
|
||||
string foliageType = 25;
|
||||
string foliageColor = 26;
|
||||
string foliageShape = 27;
|
||||
int32 height = 28;
|
||||
string floweringPeriod = 29;
|
||||
string floweringColor = 30;
|
||||
string floweringShape = 31;
|
||||
int32 floweringDiameter = 32;
|
||||
}
|
||||
|
||||
message WikiListReq {
|
||||
@@ -192,6 +257,69 @@ message WikiDetailResp {
|
||||
WikiInfo wiki = 1;
|
||||
}
|
||||
|
||||
message CreateWikiReq {
|
||||
string name = 1;
|
||||
string latinName = 2;
|
||||
string aliases = 3;
|
||||
string genus = 4;
|
||||
int32 difficulty = 5;
|
||||
int32 isHot = 6;
|
||||
string growthHabit = 7;
|
||||
string lightIntensity = 8;
|
||||
string optimalTempPeriod = 9;
|
||||
string classId = 10;
|
||||
string distributionArea = 11;
|
||||
string lifeCycle = 12;
|
||||
repeated string classIds = 13;
|
||||
repeated string ossIds = 14;
|
||||
repeated string relatedWikiIds = 15;
|
||||
string reproductionMethod = 16;
|
||||
string pestsDiseases = 17;
|
||||
string lightType = 18;
|
||||
string stem = 19;
|
||||
string fruit = 20;
|
||||
string foliageType = 21;
|
||||
string foliageColor = 22;
|
||||
string foliageShape = 23;
|
||||
int32 height = 24;
|
||||
string floweringPeriod = 25;
|
||||
string floweringColor = 26;
|
||||
string floweringShape = 27;
|
||||
int32 floweringDiameter = 28;
|
||||
}
|
||||
|
||||
message UpdateWikiReq {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string latinName = 3;
|
||||
string aliases = 4;
|
||||
string genus = 5;
|
||||
int32 difficulty = 6;
|
||||
int32 isHot = 7;
|
||||
string growthHabit = 8;
|
||||
string lightIntensity = 9;
|
||||
string optimalTempPeriod = 10;
|
||||
string classId = 11;
|
||||
string distributionArea = 12;
|
||||
string lifeCycle = 13;
|
||||
repeated string classIds = 14;
|
||||
repeated string ossIds = 15;
|
||||
repeated string relatedWikiIds = 16;
|
||||
string reproductionMethod = 17;
|
||||
string pestsDiseases = 18;
|
||||
string lightType = 19;
|
||||
string stem = 20;
|
||||
string fruit = 21;
|
||||
string foliageType = 22;
|
||||
string foliageColor = 23;
|
||||
string foliageShape = 24;
|
||||
int32 height = 25;
|
||||
string floweringPeriod = 26;
|
||||
string floweringColor = 27;
|
||||
string floweringShape = 28;
|
||||
int32 floweringDiameter = 29;
|
||||
}
|
||||
|
||||
message WikiClassInfo {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
@@ -207,12 +335,33 @@ message CreateWikiClassReq {
|
||||
string icon = 2;
|
||||
}
|
||||
|
||||
message UpdateWikiClassReq {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string icon = 3;
|
||||
}
|
||||
|
||||
message ToggleStarReq {
|
||||
string userId = 1;
|
||||
string targetId = 2;
|
||||
string type = 3;
|
||||
}
|
||||
|
||||
// ========== OCR ==========
|
||||
|
||||
message ClassifyLogInfo {
|
||||
string id = 1;
|
||||
string userId = 2;
|
||||
string imageUrl = 3;
|
||||
string result = 4;
|
||||
string createdAt = 5;
|
||||
}
|
||||
|
||||
message ClassifyLogListResp {
|
||||
repeated ClassifyLogInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
// ========== 社区帖子 ==========
|
||||
|
||||
message PostInfo {
|
||||
@@ -226,6 +375,7 @@ message PostInfo {
|
||||
int32 starCount = 8;
|
||||
string location = 9;
|
||||
int64 createdAt = 10;
|
||||
string topicId = 11;
|
||||
}
|
||||
|
||||
message CreatePostReq {
|
||||
@@ -281,6 +431,12 @@ message TopicInfo {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
int32 postCount = 3;
|
||||
string icon = 4;
|
||||
string desc = 5;
|
||||
string title = 6;
|
||||
string remark = 7;
|
||||
string startTime = 8;
|
||||
string endTime = 9;
|
||||
}
|
||||
|
||||
message TopicListResp {
|
||||
@@ -291,6 +447,21 @@ message CreateTopicReq {
|
||||
string name = 1;
|
||||
string icon = 2;
|
||||
string desc = 3;
|
||||
string title = 4;
|
||||
string remark = 5;
|
||||
string startTime = 6;
|
||||
string endTime = 7;
|
||||
}
|
||||
|
||||
message UpdateTopicReq {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string icon = 3;
|
||||
string desc = 4;
|
||||
string title = 5;
|
||||
string remark = 6;
|
||||
string startTime = 7;
|
||||
string endTime = 8;
|
||||
}
|
||||
|
||||
// ========== 兑换商城 ==========
|
||||
@@ -302,11 +473,13 @@ message ExchangeItemInfo {
|
||||
string imgId = 4;
|
||||
int64 cost = 5;
|
||||
int32 stock = 6;
|
||||
int32 status = 7;
|
||||
}
|
||||
|
||||
message ExchangeItemListReq {
|
||||
int32 current = 1;
|
||||
int32 pageSize = 2;
|
||||
int32 status = 3;
|
||||
}
|
||||
|
||||
message ExchangeItemListResp {
|
||||
@@ -317,6 +490,150 @@ message ExchangeItemListResp {
|
||||
message CreateExchangeOrderReq {
|
||||
string userId = 1;
|
||||
string itemId = 2;
|
||||
int32 quantity = 3;
|
||||
string recipientName = 4;
|
||||
string phone = 5;
|
||||
string address = 6;
|
||||
}
|
||||
|
||||
message CreateExchangeItemReq {
|
||||
string name = 1;
|
||||
string desc = 2;
|
||||
string imgId = 3;
|
||||
int64 cost = 4;
|
||||
int32 stock = 5;
|
||||
string type = 6;
|
||||
int64 costSunlight = 7;
|
||||
int32 limitPerUser = 8;
|
||||
int32 sort = 9;
|
||||
string startTime = 10;
|
||||
string endTime = 11;
|
||||
string imageId = 12;
|
||||
}
|
||||
|
||||
message UpdateExchangeItemReq {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string desc = 3;
|
||||
string imgId = 4;
|
||||
int64 cost = 5;
|
||||
int32 stock = 6;
|
||||
int32 status = 7;
|
||||
string type = 8;
|
||||
int64 costSunlight = 9;
|
||||
int32 limitPerUser = 10;
|
||||
int32 sort = 11;
|
||||
string startTime = 12;
|
||||
string endTime = 13;
|
||||
string imageId = 14;
|
||||
}
|
||||
|
||||
message ExchangeOrderInfo {
|
||||
string id = 1;
|
||||
string userId = 2;
|
||||
string itemId = 3;
|
||||
string itemName = 4;
|
||||
int64 cost = 5;
|
||||
int32 status = 6;
|
||||
string address = 7;
|
||||
string createdAt = 8;
|
||||
int32 quantity = 9;
|
||||
string itemType = 10;
|
||||
string recipientName = 11;
|
||||
string phone = 12;
|
||||
string trackingNo = 13;
|
||||
string remark = 14;
|
||||
string completedAt = 15;
|
||||
}
|
||||
|
||||
message ExchangeOrderListReq {
|
||||
int32 current = 1;
|
||||
int32 pageSize = 2;
|
||||
string userId = 3;
|
||||
int32 status = 4;
|
||||
}
|
||||
|
||||
message ExchangeOrderListResp {
|
||||
repeated ExchangeOrderInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
message UpdateExchangeOrderReq {
|
||||
string id = 1;
|
||||
int32 status = 2;
|
||||
string trackingNo = 3;
|
||||
string remark = 4;
|
||||
}
|
||||
|
||||
message MediaCheckCallbackReq {
|
||||
string traceId = 1;
|
||||
string postId = 2;
|
||||
string ossId = 3;
|
||||
string userId = 4;
|
||||
int32 status = 5;
|
||||
int32 type = 6;
|
||||
string errMsg = 7;
|
||||
}
|
||||
|
||||
// ========== 快捷养护 ==========
|
||||
|
||||
message QuickCareReq {
|
||||
string userId = 1;
|
||||
string plantId = 2;
|
||||
string name = 3;
|
||||
string icon = 4;
|
||||
string remark = 5;
|
||||
}
|
||||
|
||||
// ========== Banner ==========
|
||||
|
||||
message BannerInfo {
|
||||
string id = 1;
|
||||
string title = 2;
|
||||
string imageId = 3;
|
||||
int32 sort = 4;
|
||||
int32 isActive = 5;
|
||||
string targetUrl = 6;
|
||||
string createdAt = 7;
|
||||
}
|
||||
|
||||
message BannerListReq {
|
||||
int32 current = 1;
|
||||
int32 pageSize = 2;
|
||||
string title = 3;
|
||||
int32 isActive = 4;
|
||||
}
|
||||
|
||||
message BannerListResp {
|
||||
repeated BannerInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
message CreateBannerReq {
|
||||
string title = 1;
|
||||
string imageId = 2;
|
||||
int32 sort = 3;
|
||||
int32 isActive = 4;
|
||||
string targetUrl = 5;
|
||||
}
|
||||
|
||||
message UpdateBannerReq {
|
||||
string id = 1;
|
||||
string title = 2;
|
||||
string imageId = 3;
|
||||
int32 sort = 4;
|
||||
int32 isActive = 5;
|
||||
string targetUrl = 6;
|
||||
}
|
||||
|
||||
message SaveAiChatHistoryReq {
|
||||
string userId = 1;
|
||||
string question = 2;
|
||||
string answer = 3;
|
||||
}
|
||||
|
||||
message SyncWikiVectorReq {
|
||||
string wikiId = 1;
|
||||
}
|
||||
|
||||
// ========== 配置 ==========
|
||||
@@ -333,6 +650,21 @@ message LevelConfigListResp {
|
||||
repeated LevelConfigInfo list = 1;
|
||||
}
|
||||
|
||||
message CreateLevelConfigReq {
|
||||
int32 level = 1;
|
||||
string title = 2;
|
||||
int64 minSunlight = 3;
|
||||
string perks = 4;
|
||||
}
|
||||
|
||||
message UpdateLevelConfigReq {
|
||||
string id = 1;
|
||||
int32 level = 2;
|
||||
string title = 3;
|
||||
int64 minSunlight = 4;
|
||||
string perks = 5;
|
||||
}
|
||||
|
||||
message BadgeConfigInfo {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
@@ -343,6 +675,8 @@ message BadgeConfigInfo {
|
||||
string targetAction = 7;
|
||||
int64 threshold = 8;
|
||||
int64 rewardSunlight = 9;
|
||||
string iconId = 10;
|
||||
int32 sort = 11;
|
||||
}
|
||||
|
||||
message BadgeConfigListReq {
|
||||
@@ -356,12 +690,97 @@ message BadgeConfigListResp {
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
message CreateBadgeConfigReq {
|
||||
string name = 1;
|
||||
string description = 2;
|
||||
string dimension = 3;
|
||||
string groupId = 4;
|
||||
int32 tier = 5;
|
||||
string targetAction = 6;
|
||||
int64 threshold = 7;
|
||||
int64 rewardSunlight = 8;
|
||||
string iconId = 9;
|
||||
int32 sort = 10;
|
||||
}
|
||||
|
||||
message UpdateBadgeConfigReq {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
string dimension = 4;
|
||||
string groupId = 5;
|
||||
int32 tier = 6;
|
||||
string targetAction = 7;
|
||||
int64 threshold = 8;
|
||||
int64 rewardSunlight = 9;
|
||||
string iconId = 10;
|
||||
int32 sort = 11;
|
||||
}
|
||||
|
||||
// ========== 完成任务 ==========
|
||||
|
||||
message CompleteTaskReq {
|
||||
string userId = 1;
|
||||
string taskId = 2;
|
||||
string remark = 3;
|
||||
}
|
||||
|
||||
message TaskCompletionResult {
|
||||
bool isLevelUp = 1;
|
||||
LevelConfigInfo currentLevel = 2;
|
||||
bool isGetBadge = 3;
|
||||
BadgeConfigInfo newBadge = 4;
|
||||
int64 rewardSunlight = 5;
|
||||
}
|
||||
|
||||
// ========== 徽章树 ==========
|
||||
|
||||
message BadgeGroupInfo {
|
||||
string groupId = 1;
|
||||
string dimension = 2;
|
||||
repeated BadgeConfigInfo badges = 3;
|
||||
}
|
||||
|
||||
message BadgeConfigTreeResp {
|
||||
repeated BadgeGroupInfo groups = 1;
|
||||
}
|
||||
|
||||
// ========== AI ==========
|
||||
|
||||
message AiQuotaResp {
|
||||
int64 remaining = 1;
|
||||
int64 total = 2;
|
||||
int64 used = 3;
|
||||
int64 limit = 4;
|
||||
}
|
||||
|
||||
message AiChatHistoryInfo {
|
||||
string id = 1;
|
||||
string userId = 2;
|
||||
string question = 3;
|
||||
string answer = 4;
|
||||
string createdAt = 5;
|
||||
}
|
||||
|
||||
message AiChatHistoryReq {
|
||||
string userId = 1;
|
||||
int32 current = 2;
|
||||
int32 pageSize = 3;
|
||||
}
|
||||
|
||||
message AiChatHistoryResp {
|
||||
repeated AiChatHistoryInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
// ========== 服务定义 ==========
|
||||
|
||||
service PlantService {
|
||||
// 用户Profile
|
||||
rpc GetUserProfile(GetProfileReq) returns (PlantUserProfile);
|
||||
rpc UpdateUserProfile(UpdateProfileReq) returns (CommonResp);
|
||||
rpc GetMyBadges(GetProfileReq) returns (UserBadgeListResp);
|
||||
rpc GetMyStars(GetProfileReq) returns (UserStarListResp);
|
||||
|
||||
// 我的植物
|
||||
rpc CreatePlant(CreatePlantReq) returns (CommonResp);
|
||||
@@ -372,16 +791,31 @@ service PlantService {
|
||||
|
||||
// 养护
|
||||
rpc AddCarePlan(AddCarePlanReq) returns (CommonResp);
|
||||
rpc DeleteCarePlan(IdsReq) returns (CommonResp);
|
||||
rpc GetTodayTaskList(GetProfileReq) returns (CareTaskListResp);
|
||||
rpc CompleteTask(CompleteTaskReq) returns (TaskCompletionResult);
|
||||
rpc AddCareRecord(AddCareRecordReq) returns (CommonResp);
|
||||
rpc AddGrowthRecord(AddGrowthRecordReq) returns (CommonResp);
|
||||
|
||||
// 百科
|
||||
rpc GetWikiList(WikiListReq) returns (WikiListResp);
|
||||
rpc GetWikiDetail(IdReq) returns (WikiDetailResp);
|
||||
rpc CreateWiki(CreateWikiReq) returns (CommonResp);
|
||||
rpc UpdateWiki(UpdateWikiReq) returns (CommonResp);
|
||||
rpc DeleteWiki(IdsReq) returns (CommonResp);
|
||||
rpc SyncWikiVector(SyncWikiVectorReq) returns (CommonResp);
|
||||
rpc DeleteWikiVector(SyncWikiVectorReq) returns (CommonResp);
|
||||
rpc SyncAllWikiVector(PageReq) returns (CommonResp);
|
||||
rpc GetWikiClassList(IdReq) returns (WikiClassListResp);
|
||||
rpc CreateWikiClass(CreateWikiClassReq) returns (CommonResp);
|
||||
rpc UpdateWikiClass(UpdateWikiClassReq) returns (CommonResp);
|
||||
rpc DeleteWikiClass(IdsReq) returns (CommonResp);
|
||||
rpc ToggleWikiStar(ToggleStarReq) returns (CommonResp);
|
||||
|
||||
// OCR
|
||||
rpc GetMyClassifyLog(GetProfileReq) returns (ClassifyLogListResp);
|
||||
rpc DeleteClassifyLog(IdsReq) returns (CommonResp);
|
||||
|
||||
// 社区
|
||||
rpc CreatePost(CreatePostReq) returns (CommonResp);
|
||||
rpc DeletePost(IdsReq) returns (CommonResp);
|
||||
@@ -389,17 +823,55 @@ service PlantService {
|
||||
rpc GetPostDetail(IdReq) returns (PostDetailResp);
|
||||
rpc CommentPost(CommentPostReq) returns (CommonResp);
|
||||
rpc LikePost(LikePostReq) returns (CommonResp);
|
||||
rpc StarPost(LikePostReq) returns (CommonResp);
|
||||
rpc MediaCheckCallback(MediaCheckCallbackReq) returns (CommonResp);
|
||||
|
||||
// 话题
|
||||
rpc GetTopicList(IdReq) returns (TopicListResp);
|
||||
rpc GetTopicDetail(IdReq) returns (TopicInfo);
|
||||
rpc CreateTopic(CreateTopicReq) returns (CommonResp);
|
||||
rpc UpdateTopic(UpdateTopicReq) returns (CommonResp);
|
||||
rpc DeleteTopic(IdsReq) returns (CommonResp);
|
||||
|
||||
// 兑换
|
||||
rpc GetExchangeItemList(ExchangeItemListReq) returns (ExchangeItemListResp);
|
||||
rpc GetExchangeItemDetail(IdReq) returns (ExchangeItemInfo);
|
||||
rpc CreateExchangeItem(CreateExchangeItemReq) returns (CommonResp);
|
||||
rpc UpdateExchangeItem(UpdateExchangeItemReq) returns (CommonResp);
|
||||
rpc DeleteExchangeItem(IdsReq) returns (CommonResp);
|
||||
rpc CreateExchangeOrder(CreateExchangeOrderReq) returns (CommonResp);
|
||||
rpc GetMyExchangeOrders(ExchangeOrderListReq) returns (ExchangeOrderListResp);
|
||||
rpc GetExchangeOrderList(ExchangeOrderListReq) returns (ExchangeOrderListResp);
|
||||
rpc UpdateExchangeOrder(UpdateExchangeOrderReq) returns (CommonResp);
|
||||
|
||||
// 配置
|
||||
rpc GetLevelConfigList(PageReq) returns (LevelConfigListResp);
|
||||
rpc GetLevelConfigDetail(IdReq) returns (LevelConfigInfo);
|
||||
rpc CreateLevelConfig(CreateLevelConfigReq) returns (CommonResp);
|
||||
rpc UpdateLevelConfig(UpdateLevelConfigReq) returns (CommonResp);
|
||||
rpc DeleteLevelConfig(IdsReq) returns (CommonResp);
|
||||
rpc GetBadgeConfigList(BadgeConfigListReq) returns (BadgeConfigListResp);
|
||||
rpc GetBadgeConfigDetail(IdReq) returns (BadgeConfigInfo);
|
||||
rpc GetBadgeConfigTree(IdReq) returns (BadgeConfigTreeResp);
|
||||
rpc CreateBadgeConfig(CreateBadgeConfigReq) returns (CommonResp);
|
||||
rpc UpdateBadgeConfig(UpdateBadgeConfigReq) returns (CommonResp);
|
||||
rpc DeleteBadgeConfig(IdsReq) returns (CommonResp);
|
||||
rpc GetWikiClassDetail(IdReq) returns (WikiClassInfo);
|
||||
|
||||
// AI
|
||||
rpc GetAiChatHistory(AiChatHistoryReq) returns (AiChatHistoryResp);
|
||||
rpc SaveAiChatHistory(SaveAiChatHistoryReq) returns (CommonResp);
|
||||
rpc DeleteAiChatHistory(IdsReq) returns (CommonResp);
|
||||
rpc ClearAiChatHistory(GetProfileReq) returns (CommonResp);
|
||||
rpc GetAiChatQuota(GetProfileReq) returns (AiQuotaResp);
|
||||
|
||||
// 快捷养护
|
||||
rpc QuickCare(QuickCareReq) returns (CommonResp);
|
||||
|
||||
// Banner
|
||||
rpc CreateBanner(CreateBannerReq) returns (CommonResp);
|
||||
rpc UpdateBanner(UpdateBannerReq) returns (CommonResp);
|
||||
rpc DeleteBanner(IdsReq) returns (CommonResp);
|
||||
rpc GetBannerList(BannerListReq) returns (BannerListResp);
|
||||
rpc GetActiveBannerList(PageReq) returns (BannerListResp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user