276 lines
7.6 KiB
Protocol Buffer
276 lines
7.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option go_package ="./pb";
|
|
|
|
package pb;
|
|
|
|
// ------------------------------------
|
|
// Messages
|
|
// ------------------------------------
|
|
|
|
//--------------------------------shopInvitations--------------------------------
|
|
message ShopInvitations {
|
|
int64 id = 1; //id
|
|
int64 shopId = 2; //shopId
|
|
int64 playerId = 3; //playerId
|
|
string status = 4; //status
|
|
int64 invitedBy = 5; //invitedBy
|
|
int64 createdAt = 6; //createdAt
|
|
int64 respondedAt = 7; //respondedAt
|
|
}
|
|
|
|
message AddShopInvitationsReq {
|
|
int64 shopId = 1; //shopId
|
|
int64 playerId = 2; //playerId
|
|
string status = 3; //status
|
|
int64 invitedBy = 4; //invitedBy
|
|
int64 createdAt = 5; //createdAt
|
|
int64 respondedAt = 6; //respondedAt
|
|
}
|
|
|
|
message AddShopInvitationsResp {
|
|
}
|
|
|
|
message UpdateShopInvitationsReq {
|
|
int64 id = 1; //id
|
|
int64 shopId = 2; //shopId
|
|
int64 playerId = 3; //playerId
|
|
string status = 4; //status
|
|
int64 invitedBy = 5; //invitedBy
|
|
int64 createdAt = 6; //createdAt
|
|
int64 respondedAt = 7; //respondedAt
|
|
}
|
|
|
|
message UpdateShopInvitationsResp {
|
|
ShopInvitations shopInvitations = 1;
|
|
}
|
|
|
|
message DelShopInvitationsReq {
|
|
int64 id = 1; //id
|
|
}
|
|
|
|
message DelShopInvitationsResp {
|
|
}
|
|
|
|
message GetShopInvitationsByIdReq {
|
|
int64 id = 1; //id
|
|
}
|
|
|
|
message GetShopInvitationsByIdResp {
|
|
ShopInvitations shopInvitations = 1; //shopInvitations
|
|
}
|
|
|
|
message SearchShopInvitationsReq {
|
|
int64 offset = 1; //offset
|
|
int64 limit = 2; //limit
|
|
int64 id = 3; //id
|
|
int64 shopId = 4; //shopId
|
|
int64 playerId = 5; //playerId
|
|
string status = 6; //status
|
|
int64 invitedBy = 7; //invitedBy
|
|
int64 createdAt = 8; //createdAt
|
|
int64 respondedAt = 9; //respondedAt
|
|
}
|
|
|
|
message SearchShopInvitationsResp {
|
|
repeated ShopInvitations shopInvitations = 1; //shopInvitations
|
|
}
|
|
|
|
//--------------------------------shopPlayers--------------------------------
|
|
message ShopPlayers {
|
|
int64 shopId = 1; //shopId
|
|
int64 playerId = 2; //playerId
|
|
bool isPrimary = 3; //isPrimary
|
|
int64 joinedAt = 4; //joinedAt
|
|
int64 leftAt = 5; //leftAt
|
|
}
|
|
|
|
message AddShopPlayersReq {
|
|
int64 shopId = 1; //shopId
|
|
int64 playerId = 2; //playerId
|
|
bool isPrimary = 3; //isPrimary
|
|
int64 joinedAt = 4; //joinedAt
|
|
int64 leftAt = 5; //leftAt
|
|
}
|
|
|
|
message AddShopPlayersResp {
|
|
}
|
|
|
|
message UpdateShopPlayersReq {
|
|
int64 shopId = 1; //shopId
|
|
int64 playerId = 2; //playerId
|
|
bool isPrimary = 3; //isPrimary
|
|
int64 joinedAt = 4; //joinedAt
|
|
int64 leftAt = 5; //leftAt
|
|
}
|
|
|
|
message UpdateShopPlayersResp {
|
|
}
|
|
|
|
message DelShopPlayersReq {
|
|
int64 shopId = 1; //shopId
|
|
int64 playerId = 2; //playerId
|
|
}
|
|
|
|
message DelShopPlayersResp {
|
|
}
|
|
|
|
message GetShopPlayersByIdReq {
|
|
int64 shopId = 1; //shopId
|
|
int64 playerId = 2; //playerId
|
|
}
|
|
|
|
message GetShopPlayersByIdResp {
|
|
ShopPlayers shopPlayers = 1; //shopPlayers
|
|
}
|
|
|
|
message SearchShopPlayersReq {
|
|
int64 offset = 1; //offset
|
|
int64 limit = 2; //limit
|
|
int64 shopId = 3; //shopId
|
|
int64 playerId = 4; //playerId
|
|
bool isPrimary = 5; //isPrimary
|
|
int64 joinedAt = 6; //joinedAt
|
|
int64 leftAt = 7; //leftAt
|
|
}
|
|
|
|
message SearchShopPlayersResp {
|
|
repeated ShopPlayers shopPlayers = 1; //shopPlayers
|
|
}
|
|
|
|
//--------------------------------shops--------------------------------
|
|
message Shops {
|
|
int64 id = 1; //id
|
|
int64 ownerId = 2; //ownerId
|
|
string name = 3; //name
|
|
string banner = 4; //banner
|
|
string description = 5; //description
|
|
string rating = 6; //rating
|
|
int64 totalOrders = 7; //totalOrders
|
|
int64 playerCount = 8; //playerCount
|
|
string commissionType = 9; //commissionType
|
|
string commissionValue = 10; //commissionValue
|
|
bool allowMultiShop = 11; //allowMultiShop
|
|
bool allowIndependentOrders = 12; //allowIndependentOrders
|
|
string dispatchMode = 13; //dispatchMode
|
|
repeated string announcements = 14; //announcements
|
|
string templateConfig = 15; //templateConfig
|
|
int64 createdAt = 16; //createdAt
|
|
int64 updatedAt = 17; //updatedAt
|
|
}
|
|
|
|
message AddShopsReq {
|
|
int64 ownerId = 1; //ownerId
|
|
string name = 2; //name
|
|
string banner = 3; //banner
|
|
string description = 4; //description
|
|
string rating = 5; //rating
|
|
int64 totalOrders = 6; //totalOrders
|
|
int64 playerCount = 7; //playerCount
|
|
string commissionType = 8; //commissionType
|
|
string commissionValue = 9; //commissionValue
|
|
bool allowMultiShop = 10; //allowMultiShop
|
|
bool allowIndependentOrders = 11; //allowIndependentOrders
|
|
string dispatchMode = 12; //dispatchMode
|
|
repeated string announcements = 13; //announcements
|
|
string templateConfig = 14; //templateConfig
|
|
int64 createdAt = 15; //createdAt
|
|
int64 updatedAt = 16; //updatedAt
|
|
}
|
|
|
|
message AddShopsResp {
|
|
}
|
|
|
|
message UpdateShopsReq {
|
|
int64 id = 1; //id
|
|
int64 ownerId = 2; //ownerId
|
|
string name = 3; //name
|
|
string banner = 4; //banner
|
|
string description = 5; //description
|
|
string rating = 6; //rating
|
|
int64 totalOrders = 7; //totalOrders
|
|
int64 playerCount = 8; //playerCount
|
|
string commissionType = 9; //commissionType
|
|
string commissionValue = 10; //commissionValue
|
|
bool allowMultiShop = 11; //allowMultiShop
|
|
bool allowIndependentOrders = 12; //allowIndependentOrders
|
|
string dispatchMode = 13; //dispatchMode
|
|
repeated string announcements = 14; //announcements
|
|
string templateConfig = 15; //templateConfig
|
|
int64 createdAt = 16; //createdAt
|
|
int64 updatedAt = 17; //updatedAt
|
|
}
|
|
|
|
message UpdateShopsResp {
|
|
}
|
|
|
|
message DelShopsReq {
|
|
int64 id = 1; //id
|
|
}
|
|
|
|
message DelShopsResp {
|
|
}
|
|
|
|
message GetShopsByIdReq {
|
|
int64 id = 1; //id
|
|
}
|
|
|
|
message GetShopsByIdResp {
|
|
Shops shops = 1; //shops
|
|
}
|
|
|
|
message SearchShopsReq {
|
|
int64 offset = 1; //offset
|
|
int64 limit = 2; //limit
|
|
int64 id = 3; //id
|
|
int64 ownerId = 4; //ownerId
|
|
string name = 5; //name
|
|
string banner = 6; //banner
|
|
string description = 7; //description
|
|
string rating = 8; //rating
|
|
int64 totalOrders = 9; //totalOrders
|
|
int64 playerCount = 10; //playerCount
|
|
string commissionType = 11; //commissionType
|
|
string commissionValue = 12; //commissionValue
|
|
bool allowMultiShop = 13; //allowMultiShop
|
|
bool allowIndependentOrders = 14; //allowIndependentOrders
|
|
string dispatchMode = 15; //dispatchMode
|
|
repeated string announcements = 16; //announcements
|
|
string templateConfig = 17; //templateConfig
|
|
int64 createdAt = 18; //createdAt
|
|
int64 updatedAt = 19; //updatedAt
|
|
}
|
|
|
|
message SearchShopsResp {
|
|
repeated Shops shops = 1; //shops
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------
|
|
// Rpc Func
|
|
// ------------------------------------
|
|
|
|
service shopService{
|
|
|
|
//-----------------------shopInvitations-----------------------
|
|
rpc AddShopInvitations(AddShopInvitationsReq) returns (AddShopInvitationsResp);
|
|
rpc UpdateShopInvitations(UpdateShopInvitationsReq) returns (UpdateShopInvitationsResp);
|
|
rpc DelShopInvitations(DelShopInvitationsReq) returns (DelShopInvitationsResp);
|
|
rpc GetShopInvitationsById(GetShopInvitationsByIdReq) returns (GetShopInvitationsByIdResp);
|
|
rpc SearchShopInvitations(SearchShopInvitationsReq) returns (SearchShopInvitationsResp);
|
|
//-----------------------shopPlayers-----------------------
|
|
rpc AddShopPlayers(AddShopPlayersReq) returns (AddShopPlayersResp);
|
|
rpc UpdateShopPlayers(UpdateShopPlayersReq) returns (UpdateShopPlayersResp);
|
|
rpc DelShopPlayers(DelShopPlayersReq) returns (DelShopPlayersResp);
|
|
rpc GetShopPlayersById(GetShopPlayersByIdReq) returns (GetShopPlayersByIdResp);
|
|
rpc SearchShopPlayers(SearchShopPlayersReq) returns (SearchShopPlayersResp);
|
|
//-----------------------shops-----------------------
|
|
rpc AddShops(AddShopsReq) returns (AddShopsResp);
|
|
rpc UpdateShops(UpdateShopsReq) returns (UpdateShopsResp);
|
|
rpc DelShops(DelShopsReq) returns (DelShopsResp);
|
|
rpc GetShopsById(GetShopsByIdReq) returns (GetShopsByIdResp);
|
|
rpc SearchShops(SearchShopsReq) returns (SearchShopsResp);
|
|
|
|
}
|