Merge branch 'main-merge-base-a'

# Conflicts:
#	deploy/dev/docker-compose.yml
#	deploy/dev/envoy.yaml
#	desc/api/dispute.api
#	desc/api/review.api
#	desc/api/search.api
This commit is contained in:
zetaloop
2026-04-25 05:42:42 +08:00
231 changed files with 34629 additions and 44 deletions
+137
View File
@@ -0,0 +1,137 @@
syntax = "proto3";
option go_package ="./pb";
package pb;
// ------------------------------------
// Messages
// ------------------------------------
//--------------------------------disputes--------------------------------
message Disputes {
int64 id = 1;
int64 orderId = 2;
int64 initiatorId = 3;
string initiatorName = 4;
int64 respondentId = 5;
string reason = 6;
repeated string evidence = 7;
string status = 8;
string result = 9;
string respondentReason = 10;
repeated string respondentEvidence = 11;
string appealReason = 12;
int64 appealedAt = 13;
int64 resolvedBy = 14;
int64 resolvedAt = 15;
int64 createdAt = 16;
int64 updatedAt = 17;
}
message AddDisputesReq {
int64 orderId = 1;
int64 initiatorId = 2;
string initiatorName = 3;
int64 respondentId = 4;
string reason = 5;
repeated string evidence = 6;
string status = 7;
}
message AddDisputesResp {
int64 id = 1;
}
message UpdateDisputesReq {
int64 id = 1;
optional string status = 2;
optional string result = 3;
optional string respondentReason = 4;
repeated string respondentEvidence = 5;
optional string appealReason = 6;
optional int64 appealedAt = 7;
optional int64 resolvedBy = 8;
optional int64 resolvedAt = 9;
}
message UpdateDisputesResp {
}
message DelDisputesReq {
int64 id = 1;
}
message DelDisputesResp {
}
message GetDisputesByIdReq {
int64 id = 1;
}
message GetDisputesByIdResp {
Disputes disputes = 1;
}
message SearchDisputesReq {
int64 offset = 1;
int64 limit = 2;
optional int64 id = 3;
optional int64 orderId = 4;
optional int64 initiatorId = 5;
optional int64 respondentId = 6;
optional string status = 7;
}
message SearchDisputesResp {
repeated Disputes disputes = 1;
}
//--------------------------------disputeTimeline--------------------------------
message DisputeTimeline {
int64 id = 1;
int64 disputeId = 2;
string eventType = 3;
int64 actorId = 4;
string actorName = 5;
string details = 6;
int64 createdAt = 7;
}
message AddDisputeTimelineReq {
int64 disputeId = 1;
string eventType = 2;
int64 actorId = 3;
string actorName = 4;
string details = 5;
}
message AddDisputeTimelineResp {
}
message SearchDisputeTimelineReq {
int64 offset = 1;
int64 limit = 2;
optional int64 disputeId = 3;
}
message SearchDisputeTimelineResp {
repeated DisputeTimeline timeline = 1;
}
// ------------------------------------
// Rpc Func
// ------------------------------------
service disputeService {
//-----------------------disputes-----------------------
rpc AddDisputes(AddDisputesReq) returns (AddDisputesResp);
rpc UpdateDisputes(UpdateDisputesReq) returns (UpdateDisputesResp);
rpc DelDisputes(DelDisputesReq) returns (DelDisputesResp);
rpc GetDisputesById(GetDisputesByIdReq) returns (GetDisputesByIdResp);
rpc SearchDisputes(SearchDisputesReq) returns (SearchDisputesResp);
//-----------------------disputeTimeline-----------------------
rpc AddDisputeTimeline(AddDisputeTimelineReq) returns (AddDisputeTimelineResp);
rpc SearchDisputeTimeline(SearchDisputeTimelineReq) returns (SearchDisputeTimelineResp);
}
+87
View File
@@ -0,0 +1,87 @@
syntax = "proto3";
option go_package ="./pb";
package pb;
// ------------------------------------
// Messages
// ------------------------------------
//--------------------------------notifications--------------------------------
message Notifications {
int64 id = 1;
int64 userId = 2;
string type = 3;
string title = 4;
string content = 5;
bool read = 6;
string link = 7;
int64 createdAt = 8;
int64 updatedAt = 9;
}
message AddNotificationsReq {
int64 userId = 1;
string type = 2;
string title = 3;
string content = 4;
optional string link = 5;
}
message AddNotificationsResp {
int64 id = 1;
}
message UpdateNotificationsReq {
int64 id = 1;
optional bool read = 2;
optional string type = 3;
optional string title = 4;
optional string content = 5;
optional string link = 6;
optional int64 updatedAt = 7;
}
message UpdateNotificationsResp {
}
message DelNotificationsReq {
int64 id = 1;
}
message DelNotificationsResp {
}
message GetNotificationsByIdReq {
int64 id = 1;
}
message GetNotificationsByIdResp {
Notifications notifications = 1;
}
message SearchNotificationsReq {
int64 offset = 1;
int64 limit = 2;
optional int64 id = 3;
optional int64 userId = 4;
optional string type = 5;
optional bool read = 6;
}
message SearchNotificationsResp {
repeated Notifications notifications = 1;
}
// ------------------------------------
// Rpc Func
// ------------------------------------
service notificationService {
rpc AddNotifications(AddNotificationsReq) returns (AddNotificationsResp);
rpc UpdateNotifications(UpdateNotificationsReq) returns (UpdateNotificationsResp);
rpc DelNotifications(DelNotificationsReq) returns (DelNotificationsResp);
rpc GetNotificationsById(GetNotificationsByIdReq) returns (GetNotificationsByIdResp);
rpc SearchNotifications(SearchNotificationsReq) returns (SearchNotificationsResp);
}
+99
View File
@@ -0,0 +1,99 @@
syntax = "proto3";
option go_package ="./pb";
package pb;
// ------------------------------------
// Messages
// ------------------------------------
//--------------------------------reviews--------------------------------
message Reviews {
int64 id = 1; //id
int64 orderId = 2; //orderId
int64 fromUserId = 3; //fromUserId
string fromUserName = 4; //fromUserName
string fromUserAvatar = 5; //fromUserAvatar
int64 toUserId = 6; //toUserId
int32 rating = 7; //rating
string content = 8; //content
bool sealed = 9; //sealed
int64 createdAt = 10; //createdAt
int64 unsealedAt = 11; //unsealedAt
}
message AddReviewsReq {
int64 orderId = 1; //orderId
int64 fromUserId = 2; //fromUserId
string fromUserName = 3; //fromUserName
string fromUserAvatar = 4; //fromUserAvatar
int64 toUserId = 5; //toUserId
int32 rating = 6; //rating
string content = 7; //content
bool sealed = 8; //sealed
int64 createdAt = 9; //createdAt
}
message AddReviewsResp {
int64 id = 1; //id
}
message UpdateReviewsReq {
int64 id = 1; //id
optional int64 orderId = 2; //orderId
optional int64 fromUserId = 3; //fromUserId
optional string fromUserName = 4; //fromUserName
optional string fromUserAvatar = 5; //fromUserAvatar
optional int64 toUserId = 6; //toUserId
optional int32 rating = 7; //rating
optional string content = 8; //content
optional bool sealed = 9; //sealed
optional int64 createdAt = 10; //createdAt
optional int64 unsealedAt = 11; //unsealedAt
}
message UpdateReviewsResp {
}
message DelReviewsReq {
int64 id = 1; //id
}
message DelReviewsResp {
}
message GetReviewsByIdReq {
int64 id = 1; //id
}
message GetReviewsByIdResp {
Reviews reviews = 1; //reviews
}
message SearchReviewsReq {
int64 offset = 1; //offset
int64 limit = 2; //limit
optional int64 id = 3; //id
optional int64 orderId = 4; //orderId
optional int64 fromUserId = 5; //fromUserId
optional int64 toUserId = 6; //toUserId
optional bool sealed = 7; //sealed
}
message SearchReviewsResp {
repeated Reviews reviews = 1; //reviews
}
// ------------------------------------
// Rpc Func
// ------------------------------------
service reviewService {
//-----------------------reviews-----------------------
rpc AddReviews(AddReviewsReq) returns (AddReviewsResp);
rpc UpdateReviews(UpdateReviewsReq) returns (UpdateReviewsResp);
rpc DelReviews(DelReviewsReq) returns (DelReviewsResp);
rpc GetReviewsById(GetReviewsByIdReq) returns (GetReviewsByIdResp);
rpc SearchReviews(SearchReviewsReq) returns (SearchReviewsResp);
}
+67
View File
@@ -0,0 +1,67 @@
syntax = "proto3";
option go_package ="./pb";
package pb;
// ------------------------------------
// Messages
// ------------------------------------
//--------------------------------favorites--------------------------------
message Favorites {
int64 id = 1;
int64 userId = 2;
string targetType = 3;
int64 targetId = 4;
int64 createdAt = 5;
}
message AddFavoritesReq {
int64 userId = 1;
string targetType = 2;
int64 targetId = 3;
}
message AddFavoritesResp {
int64 id = 1;
}
message DelFavoritesReq {
int64 id = 1;
}
message DelFavoritesResp {
}
message GetFavoritesByIdReq {
int64 id = 1;
}
message GetFavoritesByIdResp {
Favorites favorites = 1;
}
message SearchFavoritesReq {
int64 offset = 1;
int64 limit = 2;
optional int64 id = 3;
optional int64 userId = 4;
optional string targetType = 5;
optional int64 targetId = 6;
}
message SearchFavoritesResp {
repeated Favorites favorites = 1;
}
// ------------------------------------
// Rpc Func
// ------------------------------------
service searchService {
rpc AddFavorites(AddFavoritesReq) returns (AddFavoritesResp);
rpc DelFavorites(DelFavoritesReq) returns (DelFavoritesResp);
rpc GetFavoritesById(GetFavoritesByIdReq) returns (GetFavoritesByIdResp);
rpc SearchFavorites(SearchFavoritesReq) returns (SearchFavoritesResp);
}