Refactor: Remove deprecated gRPC service files and implement new API structure
- Deleted old gRPC service definitions in `game_grpc.pb.go` and `public.go`. - Added new API server implementations for objectstory, player, and shop services. - Introduced configuration files for new APIs in `etc/*.yaml`. - Created main entry points for each service in `objectstory.go`, `player.go`, and `shop.go`. - Removed unused user update handler and user API files. - Added utility functions for context management and HTTP header parsing. - Introduced PostgreSQL backup configuration in `backup/postgreSql.yaml`.
This commit is contained in:
@@ -0,0 +1,320 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package ="./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
// ------------------------------------
|
||||
// Messages
|
||||
// ------------------------------------
|
||||
|
||||
//--------------------------------commentLikes--------------------------------
|
||||
message CommentLikes {
|
||||
int64 commentId = 1; //commentId
|
||||
int64 userId = 2; //userId
|
||||
int64 createdAt = 3; //createdAt
|
||||
}
|
||||
|
||||
message AddCommentLikesReq {
|
||||
int64 commentId = 1; //commentId
|
||||
int64 userId = 2; //userId
|
||||
int64 createdAt = 3; //createdAt
|
||||
}
|
||||
|
||||
message AddCommentLikesResp {
|
||||
}
|
||||
|
||||
message UpdateCommentLikesReq {
|
||||
int64 commentId = 1; //commentId
|
||||
int64 userId = 2; //userId
|
||||
int64 createdAt = 3; //createdAt
|
||||
}
|
||||
|
||||
message UpdateCommentLikesResp {
|
||||
}
|
||||
|
||||
message DelCommentLikesReq {
|
||||
int64 id = 1; //id
|
||||
optional int64 userId = 2; //userId
|
||||
}
|
||||
|
||||
message DelCommentLikesResp {
|
||||
}
|
||||
|
||||
message GetCommentLikesByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetCommentLikesByIdResp {
|
||||
CommentLikes commentLikes = 1; //commentLikes
|
||||
}
|
||||
|
||||
message SearchCommentLikesReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 commentId = 3; //commentId
|
||||
int64 userId = 4; //userId
|
||||
int64 createdAt = 5; //createdAt
|
||||
}
|
||||
|
||||
message SearchCommentLikesResp {
|
||||
repeated CommentLikes commentLikes = 1; //commentLikes
|
||||
}
|
||||
|
||||
//--------------------------------comments--------------------------------
|
||||
message Comments {
|
||||
int64 id = 1; //id
|
||||
int64 postId = 2; //postId
|
||||
int64 authorId = 3; //authorId
|
||||
string content = 4; //content
|
||||
int64 likeCount = 5; //likeCount
|
||||
int64 createdAt = 6; //createdAt
|
||||
int64 deletedAt = 7; //deletedAt
|
||||
}
|
||||
|
||||
message AddCommentsReq {
|
||||
int64 postId = 1; //postId
|
||||
int64 authorId = 2; //authorId
|
||||
string content = 3; //content
|
||||
int64 likeCount = 4; //likeCount
|
||||
int64 createdAt = 5; //createdAt
|
||||
int64 deletedAt = 6; //deletedAt
|
||||
}
|
||||
|
||||
message AddCommentsResp {
|
||||
}
|
||||
|
||||
message UpdateCommentsReq {
|
||||
int64 id = 1; //id
|
||||
int64 postId = 2; //postId
|
||||
int64 authorId = 3; //authorId
|
||||
string content = 4; //content
|
||||
int64 likeCount = 5; //likeCount
|
||||
int64 createdAt = 6; //createdAt
|
||||
int64 deletedAt = 7; //deletedAt
|
||||
}
|
||||
|
||||
message UpdateCommentsResp {
|
||||
}
|
||||
|
||||
message DelCommentsReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelCommentsResp {
|
||||
}
|
||||
|
||||
message GetCommentsByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetCommentsByIdResp {
|
||||
Comments comments = 1; //comments
|
||||
}
|
||||
|
||||
message SearchCommentsReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 id = 3; //id
|
||||
int64 postId = 4; //postId
|
||||
int64 authorId = 5; //authorId
|
||||
optional string content = 6; //content
|
||||
optional int64 likeCount = 7; //likeCount
|
||||
int64 createdAt = 8; //createdAt
|
||||
int64 deletedAt = 9; //deletedAt
|
||||
}
|
||||
|
||||
message SearchCommentsResp {
|
||||
repeated Comments comments = 1; //comments
|
||||
}
|
||||
|
||||
//--------------------------------postLikes--------------------------------
|
||||
message PostLikes {
|
||||
int64 postId = 1; //postId
|
||||
int64 userId = 2; //userId
|
||||
int64 createdAt = 3; //createdAt
|
||||
}
|
||||
|
||||
message AddPostLikesReq {
|
||||
int64 postId = 1; //postId
|
||||
int64 userId = 2; //userId
|
||||
int64 createdAt = 3; //createdAt
|
||||
}
|
||||
|
||||
message AddPostLikesResp {
|
||||
}
|
||||
|
||||
message UpdatePostLikesReq {
|
||||
optional int64 postId = 1; //postId
|
||||
optional int64 userId = 2; //userId
|
||||
int64 createdAt = 3; //createdAt
|
||||
}
|
||||
|
||||
message UpdatePostLikesResp {
|
||||
}
|
||||
|
||||
message DelPostLikesReq {
|
||||
int64 id = 1; //id
|
||||
optional int64 userId = 2; //userId
|
||||
}
|
||||
|
||||
message DelPostLikesResp {
|
||||
}
|
||||
|
||||
message GetPostLikesByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetPostLikesByIdResp {
|
||||
PostLikes postLikes = 1; //postLikes
|
||||
}
|
||||
|
||||
message SearchPostLikesReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
optional int64 postId = 3; //postId
|
||||
optional int64 userId = 4; //userId
|
||||
int64 createdAt = 5; //createdAt
|
||||
}
|
||||
|
||||
message SearchPostLikesResp {
|
||||
repeated PostLikes postLikes = 1; //postLikes
|
||||
}
|
||||
|
||||
//--------------------------------posts--------------------------------
|
||||
message Posts {
|
||||
int64 id = 1; //id
|
||||
int64 authorId = 2; //authorId
|
||||
string authorRole = 3; //authorRole
|
||||
string title = 4; //title
|
||||
string content = 5; //content
|
||||
repeated string images = 6; //images
|
||||
repeated string tags = 7; //tags
|
||||
int64 linkedOrderId = 8; //linkedOrderId
|
||||
int64 quotedPostId = 9; //quotedPostId
|
||||
int64 likeCount = 10; //likeCount
|
||||
int64 commentCount = 11; //commentCount
|
||||
bool pinned = 12; //pinned
|
||||
string searchText = 13; //searchText
|
||||
int64 createdAt = 14; //createdAt
|
||||
int64 updatedAt = 15; //updatedAt
|
||||
int64 deletedAt = 16; //deletedAt
|
||||
}
|
||||
|
||||
message AddPostsReq {
|
||||
int64 authorId = 1; //authorId
|
||||
string authorRole = 2; //authorRole
|
||||
string title = 3; //title
|
||||
string content = 4; //content
|
||||
repeated string images = 5; //images
|
||||
repeated string tags = 6; //tags
|
||||
int64 linkedOrderId = 7; //linkedOrderId
|
||||
int64 quotedPostId = 8; //quotedPostId
|
||||
int64 likeCount = 9; //likeCount
|
||||
int64 commentCount = 10; //commentCount
|
||||
bool pinned = 11; //pinned
|
||||
string searchText = 12; //searchText
|
||||
int64 createdAt = 13; //createdAt
|
||||
int64 updatedAt = 14; //updatedAt
|
||||
int64 deletedAt = 15; //deletedAt
|
||||
}
|
||||
|
||||
message AddPostsResp {
|
||||
}
|
||||
|
||||
message UpdatePostsReq {
|
||||
int64 id = 1; //id
|
||||
optional int64 authorId = 2; //authorId
|
||||
optional string authorRole = 3; //authorRole
|
||||
optional string title = 4; //title
|
||||
optional string content = 5; //content
|
||||
repeated string images = 6; //images
|
||||
repeated string tags = 7; //tags
|
||||
optional int64 linkedOrderId = 8; //linkedOrderId
|
||||
optional int64 quotedPostId = 9; //quotedPostId
|
||||
optional int64 likeCount = 10; //likeCount
|
||||
optional int64 commentCount = 11; //commentCount
|
||||
optional bool pinned = 12; //pinned
|
||||
optional string searchText = 13; //searchText
|
||||
optional int64 createdAt = 14; //createdAt
|
||||
optional int64 updatedAt = 15; //updatedAt
|
||||
optional int64 deletedAt = 16; //deletedAt
|
||||
}
|
||||
|
||||
message UpdatePostsResp {
|
||||
}
|
||||
|
||||
message DelPostsReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelPostsResp {
|
||||
}
|
||||
|
||||
message GetPostsByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetPostsByIdResp {
|
||||
Posts posts = 1; //posts
|
||||
}
|
||||
|
||||
message SearchPostsReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 id = 3; //id
|
||||
optional int64 authorId = 4; //authorId
|
||||
optional string authorRole = 5; //authorRole
|
||||
optional string title = 6; //title
|
||||
optional string content = 7; //content
|
||||
repeated string images = 8; //images
|
||||
repeated string tags = 9; //tags
|
||||
optional int64 linkedOrderId = 10; //linkedOrderId
|
||||
optional int64 quotedPostId = 11; //quotedPostId
|
||||
optional int64 likeCount = 12; //likeCount
|
||||
optional int64 commentCount = 13; //commentCount
|
||||
optional bool pinned = 14; //pinned
|
||||
optional string searchText = 15; //searchText
|
||||
optional int64 createdAt = 16; //createdAt
|
||||
optional int64 updatedAt = 17; //updatedAt
|
||||
optional int64 deletedAt = 18; //deletedAt
|
||||
}
|
||||
|
||||
message SearchPostsResp {
|
||||
repeated Posts posts = 1; //posts
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------
|
||||
// Rpc Func
|
||||
// ------------------------------------
|
||||
|
||||
service communityService{
|
||||
|
||||
//-----------------------commentLikes-----------------------
|
||||
rpc AddCommentLikes(AddCommentLikesReq) returns (AddCommentLikesResp);
|
||||
rpc UpdateCommentLikes(UpdateCommentLikesReq) returns (UpdateCommentLikesResp);
|
||||
rpc DelCommentLikes(DelCommentLikesReq) returns (DelCommentLikesResp);
|
||||
rpc GetCommentLikesById(GetCommentLikesByIdReq) returns (GetCommentLikesByIdResp);
|
||||
rpc SearchCommentLikes(SearchCommentLikesReq) returns (SearchCommentLikesResp);
|
||||
//-----------------------comments-----------------------
|
||||
rpc AddComments(AddCommentsReq) returns (AddCommentsResp);
|
||||
rpc UpdateComments(UpdateCommentsReq) returns (UpdateCommentsResp);
|
||||
rpc DelComments(DelCommentsReq) returns (DelCommentsResp);
|
||||
rpc GetCommentsById(GetCommentsByIdReq) returns (GetCommentsByIdResp);
|
||||
rpc SearchComments(SearchCommentsReq) returns (SearchCommentsResp);
|
||||
//-----------------------postLikes-----------------------
|
||||
rpc AddPostLikes(AddPostLikesReq) returns (AddPostLikesResp);
|
||||
rpc UpdatePostLikes(UpdatePostLikesReq) returns (UpdatePostLikesResp);
|
||||
rpc DelPostLikes(DelPostLikesReq) returns (DelPostLikesResp);
|
||||
rpc GetPostLikesById(GetPostLikesByIdReq) returns (GetPostLikesByIdResp);
|
||||
rpc SearchPostLikes(SearchPostLikesReq) returns (SearchPostLikesResp);
|
||||
//-----------------------posts-----------------------
|
||||
rpc AddPosts(AddPostsReq) returns (AddPostsResp);
|
||||
rpc UpdatePosts(UpdatePostsReq) returns (UpdatePostsResp);
|
||||
rpc DelPosts(DelPostsReq) returns (DelPostsResp);
|
||||
rpc GetPostsById(GetPostsByIdReq) returns (GetPostsByIdResp);
|
||||
rpc SearchPosts(SearchPostsReq) returns (SearchPostsResp);
|
||||
|
||||
}
|
||||
+8
-8
@@ -66,13 +66,13 @@ message SearchGamesReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 id = 3; //id
|
||||
string name = 4; //name
|
||||
string icon = 5; //icon
|
||||
string category = 6; //category
|
||||
int64 sortOrder = 7; //sortOrder
|
||||
bool isActive = 8; //isActive
|
||||
int64 createdAt = 9; //createdAt
|
||||
int64 updatedAt = 10; //updatedAt
|
||||
optional string name = 4; //name
|
||||
optional string icon = 5; //icon
|
||||
optional string category = 6; //category
|
||||
optional int64 sortOrder = 7; //sortOrder
|
||||
optional bool isActive = 8; //isActive
|
||||
optional int64 createdAt = 9; //createdAt
|
||||
optional int64 updatedAt = 10; //updatedAt
|
||||
}
|
||||
|
||||
message SearchGamesResp {
|
||||
@@ -85,7 +85,7 @@ message SearchGamesResp {
|
||||
// Rpc Func
|
||||
// ------------------------------------
|
||||
|
||||
service public{
|
||||
service GameService {
|
||||
|
||||
//-----------------------games-----------------------
|
||||
rpc AddGames(AddGamesReq) returns (AddGamesResp);
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package ="./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
// ------------------------------------
|
||||
// Messages
|
||||
// ------------------------------------
|
||||
|
||||
//--------------------------------orders--------------------------------
|
||||
message Orders {
|
||||
int64 id = 1; //id
|
||||
int64 consumerId = 2; //consumerId
|
||||
string consumerName = 3; //consumerName
|
||||
int64 playerId = 4; //playerId
|
||||
string playerName = 5; //playerName
|
||||
optional int64 shopId = 6; //shopId
|
||||
optional string shopName = 7; //shopName
|
||||
string serviceSnapshot = 8; //serviceSnapshot
|
||||
string status = 9; //status
|
||||
string totalPrice = 10; //totalPrice
|
||||
optional string note = 11; //note
|
||||
int64 version = 12; //version
|
||||
optional string timeoutJobId = 13; //timeoutJobId
|
||||
string searchText = 14; //searchText
|
||||
int64 createdAt = 15; //createdAt
|
||||
optional int64 acceptedAt = 16; //acceptedAt
|
||||
optional int64 closedAt = 17; //closedAt
|
||||
optional int64 completedAt = 18; //completedAt
|
||||
optional int64 cancelledAt = 19; //cancelledAt
|
||||
int64 updatedAt = 20; //updatedAt
|
||||
}
|
||||
|
||||
message AddOrdersReq {
|
||||
int64 id = 1; //id
|
||||
int64 consumerId = 2; //consumerId
|
||||
string consumerName = 3; //consumerName
|
||||
int64 playerId = 4; //playerId
|
||||
string playerName = 5; //playerName
|
||||
optional int64 shopId = 6; //shopId
|
||||
optional string shopName = 7; //shopName
|
||||
string serviceSnapshot = 8; //serviceSnapshot
|
||||
optional string status = 9; //status
|
||||
string totalPrice = 10; //totalPrice
|
||||
optional string note = 11; //note
|
||||
optional int64 version = 12; //version
|
||||
optional string timeoutJobId = 13; //timeoutJobId
|
||||
optional string searchText = 14; //searchText
|
||||
optional int64 createdAt = 15; //createdAt
|
||||
optional int64 acceptedAt = 16; //acceptedAt
|
||||
optional int64 closedAt = 17; //closedAt
|
||||
optional int64 completedAt = 18; //completedAt
|
||||
optional int64 cancelledAt = 19; //cancelledAt
|
||||
optional int64 updatedAt = 20; //updatedAt
|
||||
}
|
||||
|
||||
message AddOrdersResp {
|
||||
}
|
||||
|
||||
message UpdateOrdersReq {
|
||||
int64 id = 1; //id
|
||||
optional int64 consumerId = 2; //consumerId
|
||||
optional string consumerName = 3; //consumerName
|
||||
optional int64 playerId = 4; //playerId
|
||||
optional string playerName = 5; //playerName
|
||||
optional int64 shopId = 6; //shopId
|
||||
optional string shopName = 7; //shopName
|
||||
optional string serviceSnapshot = 8; //serviceSnapshot
|
||||
optional string status = 9; //status
|
||||
optional string totalPrice = 10; //totalPrice
|
||||
optional string note = 11; //note
|
||||
optional int64 version = 12; //version
|
||||
optional string timeoutJobId = 13; //timeoutJobId
|
||||
optional string searchText = 14; //searchText
|
||||
optional int64 createdAt = 15; //createdAt
|
||||
optional int64 acceptedAt = 16; //acceptedAt
|
||||
optional int64 closedAt = 17; //closedAt
|
||||
optional int64 completedAt = 18; //completedAt
|
||||
optional int64 cancelledAt = 19; //cancelledAt
|
||||
optional int64 updatedAt = 20; //updatedAt
|
||||
}
|
||||
|
||||
message UpdateOrdersResp {
|
||||
}
|
||||
|
||||
message DelOrdersReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelOrdersResp {
|
||||
}
|
||||
|
||||
message GetOrdersByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetOrdersByIdResp {
|
||||
Orders orders = 1; //orders
|
||||
}
|
||||
|
||||
message SearchOrdersReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
optional int64 id = 3; //id
|
||||
optional int64 consumerId = 4; //consumerId
|
||||
optional string consumerName = 5; //consumerName
|
||||
optional int64 playerId = 6; //playerId
|
||||
optional string playerName = 7; //playerName
|
||||
optional int64 shopId = 8; //shopId
|
||||
optional string shopName = 9; //shopName
|
||||
optional string serviceSnapshot = 10; //serviceSnapshot
|
||||
optional string status = 11; //status
|
||||
optional string totalPrice = 12; //totalPrice
|
||||
optional string note = 13; //note
|
||||
optional int64 version = 14; //version
|
||||
optional string timeoutJobId = 15; //timeoutJobId
|
||||
optional string searchText = 16; //searchText
|
||||
optional int64 createdAt = 17; //createdAt
|
||||
optional int64 acceptedAt = 18; //acceptedAt
|
||||
optional int64 closedAt = 19; //closedAt
|
||||
optional int64 completedAt = 20; //completedAt
|
||||
optional int64 cancelledAt = 21; //cancelledAt
|
||||
optional int64 updatedAt = 22; //updatedAt
|
||||
}
|
||||
|
||||
message SearchOrdersResp {
|
||||
repeated Orders orders = 1; //orders
|
||||
}
|
||||
|
||||
//--------------------------------orderStateLogs--------------------------------
|
||||
message OrderStateLogs {
|
||||
int64 id = 1; //id
|
||||
int64 orderId = 2; //orderId
|
||||
optional string fromStatus = 3; //fromStatus
|
||||
string toStatus = 4; //toStatus
|
||||
string action = 5; //action
|
||||
int64 actorId = 6; //actorId
|
||||
string actorRole = 7; //actorRole
|
||||
optional string metadata = 8; //metadata
|
||||
int64 createdAt = 9; //createdAt
|
||||
}
|
||||
|
||||
message AddOrderStateLogsReq {
|
||||
int64 id = 1; //id
|
||||
int64 orderId = 2; //orderId
|
||||
optional string fromStatus = 3; //fromStatus
|
||||
string toStatus = 4; //toStatus
|
||||
string action = 5; //action
|
||||
int64 actorId = 6; //actorId
|
||||
string actorRole = 7; //actorRole
|
||||
optional string metadata = 8; //metadata
|
||||
optional int64 createdAt = 9; //createdAt
|
||||
}
|
||||
|
||||
message AddOrderStateLogsResp {
|
||||
}
|
||||
|
||||
message UpdateOrderStateLogsReq {
|
||||
int64 id = 1; //id
|
||||
optional int64 orderId = 2; //orderId
|
||||
optional string fromStatus = 3; //fromStatus
|
||||
optional string toStatus = 4; //toStatus
|
||||
optional string action = 5; //action
|
||||
optional int64 actorId = 6; //actorId
|
||||
optional string actorRole = 7; //actorRole
|
||||
optional string metadata = 8; //metadata
|
||||
optional int64 createdAt = 9; //createdAt
|
||||
}
|
||||
|
||||
message UpdateOrderStateLogsResp {
|
||||
}
|
||||
|
||||
message DelOrderStateLogsReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelOrderStateLogsResp {
|
||||
}
|
||||
|
||||
message GetOrderStateLogsByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetOrderStateLogsByIdResp {
|
||||
OrderStateLogs orderStateLogs = 1; //orderStateLogs
|
||||
}
|
||||
|
||||
message SearchOrderStateLogsReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
optional int64 id = 3; //id
|
||||
optional int64 orderId = 4; //orderId
|
||||
optional string fromStatus = 5; //fromStatus
|
||||
optional string toStatus = 6; //toStatus
|
||||
optional string action = 7; //action
|
||||
optional int64 actorId = 8; //actorId
|
||||
optional string actorRole = 9; //actorRole
|
||||
optional string metadata = 10; //metadata
|
||||
optional int64 createdAt = 11; //createdAt
|
||||
}
|
||||
|
||||
message SearchOrderStateLogsResp {
|
||||
repeated OrderStateLogs orderStateLogs = 1; //orderStateLogs
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
// Rpc Func
|
||||
// ------------------------------------
|
||||
|
||||
service orderService {
|
||||
//-----------------------orders-----------------------
|
||||
rpc AddOrders(AddOrdersReq) returns (AddOrdersResp);
|
||||
rpc UpdateOrders(UpdateOrdersReq) returns (UpdateOrdersResp);
|
||||
rpc DelOrders(DelOrdersReq) returns (DelOrdersResp);
|
||||
rpc GetOrdersById(GetOrdersByIdReq) returns (GetOrdersByIdResp);
|
||||
rpc SearchOrders(SearchOrdersReq) returns (SearchOrdersResp);
|
||||
|
||||
//-----------------------orderStateLogs-----------------------
|
||||
rpc AddOrderStateLogs(AddOrderStateLogsReq) returns (AddOrderStateLogsResp);
|
||||
rpc UpdateOrderStateLogs(UpdateOrderStateLogsReq) returns (UpdateOrderStateLogsResp);
|
||||
rpc DelOrderStateLogs(DelOrderStateLogsReq) returns (DelOrderStateLogsResp);
|
||||
rpc GetOrderStateLogsById(GetOrderStateLogsByIdReq) returns (GetOrderStateLogsByIdResp);
|
||||
rpc SearchOrderStateLogs(SearchOrderStateLogsReq) returns (SearchOrderStateLogsResp);
|
||||
}
|
||||
+9
-8
@@ -42,6 +42,7 @@ message UpdateShopInvitationsReq {
|
||||
}
|
||||
|
||||
message UpdateShopInvitationsResp {
|
||||
ShopInvitations shopInvitations = 1;
|
||||
}
|
||||
|
||||
message DelShopInvitationsReq {
|
||||
@@ -142,11 +143,11 @@ message Shops {
|
||||
string name = 3; //name
|
||||
string banner = 4; //banner
|
||||
string description = 5; //description
|
||||
double rating = 6; //rating
|
||||
string rating = 6; //rating
|
||||
int64 totalOrders = 7; //totalOrders
|
||||
int64 playerCount = 8; //playerCount
|
||||
string commissionType = 9; //commissionType
|
||||
double commissionValue = 10; //commissionValue
|
||||
string commissionValue = 10; //commissionValue
|
||||
bool allowMultiShop = 11; //allowMultiShop
|
||||
bool allowIndependentOrders = 12; //allowIndependentOrders
|
||||
string dispatchMode = 13; //dispatchMode
|
||||
@@ -161,11 +162,11 @@ message AddShopsReq {
|
||||
string name = 2; //name
|
||||
string banner = 3; //banner
|
||||
string description = 4; //description
|
||||
double rating = 5; //rating
|
||||
string rating = 5; //rating
|
||||
int64 totalOrders = 6; //totalOrders
|
||||
int64 playerCount = 7; //playerCount
|
||||
string commissionType = 8; //commissionType
|
||||
double commissionValue = 9; //commissionValue
|
||||
string commissionValue = 9; //commissionValue
|
||||
bool allowMultiShop = 10; //allowMultiShop
|
||||
bool allowIndependentOrders = 11; //allowIndependentOrders
|
||||
string dispatchMode = 12; //dispatchMode
|
||||
@@ -184,11 +185,11 @@ message UpdateShopsReq {
|
||||
string name = 3; //name
|
||||
string banner = 4; //banner
|
||||
string description = 5; //description
|
||||
double rating = 6; //rating
|
||||
string rating = 6; //rating
|
||||
int64 totalOrders = 7; //totalOrders
|
||||
int64 playerCount = 8; //playerCount
|
||||
string commissionType = 9; //commissionType
|
||||
double commissionValue = 10; //commissionValue
|
||||
string commissionValue = 10; //commissionValue
|
||||
bool allowMultiShop = 11; //allowMultiShop
|
||||
bool allowIndependentOrders = 12; //allowIndependentOrders
|
||||
string dispatchMode = 13; //dispatchMode
|
||||
@@ -224,11 +225,11 @@ message SearchShopsReq {
|
||||
string name = 5; //name
|
||||
string banner = 6; //banner
|
||||
string description = 7; //description
|
||||
double rating = 8; //rating
|
||||
string rating = 8; //rating
|
||||
int64 totalOrders = 9; //totalOrders
|
||||
int64 playerCount = 10; //playerCount
|
||||
string commissionType = 11; //commissionType
|
||||
double commissionValue = 12; //commissionValue
|
||||
string commissionValue = 12; //commissionValue
|
||||
bool allowMultiShop = 13; //allowMultiShop
|
||||
bool allowIndependentOrders = 14; //allowIndependentOrders
|
||||
string dispatchMode = 15; //dispatchMode
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package ="./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
// ------------------------------------
|
||||
// Messages
|
||||
// ------------------------------------
|
||||
|
||||
//--------------------------------walletTransactions--------------------------------
|
||||
message WalletTransactions {
|
||||
int64 id = 1; //id
|
||||
int64 userId = 2; //userId
|
||||
string type = 3; //type
|
||||
string amount = 4; //amount
|
||||
string balanceAfter = 5; //balanceAfter
|
||||
string description = 6; //description
|
||||
int64 orderId = 7; //orderId
|
||||
int64 createdAt = 8; //createdAt
|
||||
string searchText = 9; //searchText
|
||||
}
|
||||
|
||||
message AddWalletTransactionsReq {
|
||||
int64 userId = 1; //userId
|
||||
string type = 2; //type
|
||||
string amount = 3; //amount
|
||||
string balanceAfter = 4; //balanceAfter
|
||||
string description = 5; //description
|
||||
int64 orderId = 6; //orderId
|
||||
int64 createdAt = 7; //createdAt
|
||||
string searchText = 8; //searchText
|
||||
}
|
||||
|
||||
message AddWalletTransactionsResp {
|
||||
}
|
||||
|
||||
message UpdateWalletTransactionsReq {
|
||||
int64 id = 1; //id
|
||||
optional int64 userId = 2; //userId
|
||||
optional string type = 3; //type
|
||||
optional string amount = 4; //amount
|
||||
optional string balanceAfter = 5; //balanceAfter
|
||||
optional string description = 6; //description
|
||||
optional int64 orderId = 7; //orderId
|
||||
optional int64 createdAt = 8; //createdAt
|
||||
optional string searchText = 9; //searchText
|
||||
}
|
||||
|
||||
message UpdateWalletTransactionsResp {
|
||||
}
|
||||
|
||||
message DelWalletTransactionsReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelWalletTransactionsResp {
|
||||
}
|
||||
|
||||
message GetWalletTransactionsByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetWalletTransactionsByIdResp {
|
||||
WalletTransactions walletTransactions = 1; //walletTransactions
|
||||
}
|
||||
|
||||
message SearchWalletTransactionsReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 id = 3; //id
|
||||
optional int64 userId = 4; //userId
|
||||
optional string type = 5; //type
|
||||
optional string amount = 6; //amount
|
||||
optional string balanceAfter = 7; //balanceAfter
|
||||
optional string description = 8; //description
|
||||
optional int64 orderId = 9; //orderId
|
||||
optional int64 createdAt = 10; //createdAt
|
||||
optional string searchText = 11; //searchText
|
||||
}
|
||||
|
||||
message SearchWalletTransactionsResp {
|
||||
repeated WalletTransactions walletTransactions = 1; //walletTransactions
|
||||
}
|
||||
|
||||
//--------------------------------wallets--------------------------------
|
||||
message Wallets {
|
||||
int64 userId = 1; //userId
|
||||
string balance = 2; //balance
|
||||
string frozenBalance = 3; //frozenBalance
|
||||
int64 updatedAt = 4; //updatedAt
|
||||
int64 version = 5; //version
|
||||
}
|
||||
|
||||
message AddWalletsReq {
|
||||
int64 userId = 1; //userId
|
||||
string balance = 2; //balance
|
||||
string frozenBalance = 3; //frozenBalance
|
||||
int64 updatedAt = 4; //updatedAt
|
||||
}
|
||||
|
||||
message AddWalletsResp {
|
||||
}
|
||||
|
||||
message UpdateWalletsReq {
|
||||
int64 userId = 1; //userId
|
||||
optional string balance = 2; //balance
|
||||
optional string frozenBalance = 3; //frozenBalance
|
||||
optional int64 updatedAt = 4; //updatedAt
|
||||
optional int64 version = 5; //version
|
||||
}
|
||||
|
||||
message UpdateWalletsResp {
|
||||
}
|
||||
|
||||
message DelWalletsReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelWalletsResp {
|
||||
}
|
||||
|
||||
message GetWalletsByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetWalletsByIdResp {
|
||||
Wallets wallets = 1; //wallets
|
||||
}
|
||||
|
||||
message SearchWalletsReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 userId = 3; //userId
|
||||
optional string balance = 4; //balance
|
||||
optional string frozenBalance = 5; //frozenBalance
|
||||
optional int64 updatedAt = 6; //updatedAt
|
||||
}
|
||||
|
||||
message SearchWalletsResp {
|
||||
repeated Wallets wallets = 1; //wallets
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------
|
||||
// Rpc Func
|
||||
// ------------------------------------
|
||||
|
||||
service walletService{
|
||||
|
||||
//-----------------------walletTransactions-----------------------
|
||||
rpc AddWalletTransactions(AddWalletTransactionsReq) returns (AddWalletTransactionsResp);
|
||||
rpc UpdateWalletTransactions(UpdateWalletTransactionsReq) returns (UpdateWalletTransactionsResp);
|
||||
rpc DelWalletTransactions(DelWalletTransactionsReq) returns (DelWalletTransactionsResp);
|
||||
rpc GetWalletTransactionsById(GetWalletTransactionsByIdReq) returns (GetWalletTransactionsByIdResp);
|
||||
rpc SearchWalletTransactions(SearchWalletTransactionsReq) returns (SearchWalletTransactionsResp);
|
||||
//-----------------------wallets-----------------------
|
||||
rpc AddWallets(AddWalletsReq) returns (AddWalletsResp);
|
||||
rpc UpdateWallets(UpdateWalletsReq) returns (UpdateWalletsResp);
|
||||
rpc DelWallets(DelWalletsReq) returns (DelWalletsResp);
|
||||
rpc GetWalletsById(GetWalletsByIdReq) returns (GetWalletsByIdResp);
|
||||
rpc SearchWallets(SearchWalletsReq) returns (SearchWalletsResp);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user