fix: api descript
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package ="./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
// ------------------------------------
|
||||
// Messages
|
||||
// ------------------------------------
|
||||
|
||||
//--------------------------------games--------------------------------
|
||||
message Games {
|
||||
int64 id = 1; //id
|
||||
string name = 2; //name
|
||||
string icon = 3; //icon
|
||||
string category = 4; //category
|
||||
int64 sortOrder = 5; //sortOrder
|
||||
bool isActive = 6; //isActive
|
||||
int64 createdAt = 7; //createdAt
|
||||
int64 updatedAt = 8; //updatedAt
|
||||
}
|
||||
|
||||
message AddGamesReq {
|
||||
string name = 1; //name
|
||||
string icon = 2; //icon
|
||||
string category = 3; //category
|
||||
int64 sortOrder = 4; //sortOrder
|
||||
bool isActive = 5; //isActive
|
||||
int64 createdAt = 6; //createdAt
|
||||
int64 updatedAt = 7; //updatedAt
|
||||
}
|
||||
|
||||
message AddGamesResp {
|
||||
}
|
||||
|
||||
message UpdateGamesReq {
|
||||
int64 id = 1; //id
|
||||
string name = 2; //name
|
||||
string icon = 3; //icon
|
||||
string category = 4; //category
|
||||
int64 sortOrder = 5; //sortOrder
|
||||
bool isActive = 6; //isActive
|
||||
int64 createdAt = 7; //createdAt
|
||||
int64 updatedAt = 8; //updatedAt
|
||||
}
|
||||
|
||||
message UpdateGamesResp {
|
||||
}
|
||||
|
||||
message DelGamesReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelGamesResp {
|
||||
}
|
||||
|
||||
message GetGamesByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetGamesByIdResp {
|
||||
Games games = 1; //games
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
message SearchGamesResp {
|
||||
repeated Games games = 1; //games
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------
|
||||
// Rpc Func
|
||||
// ------------------------------------
|
||||
|
||||
service public{
|
||||
|
||||
//-----------------------games-----------------------
|
||||
rpc AddGames(AddGamesReq) returns (AddGamesResp);
|
||||
rpc UpdateGames(UpdateGamesReq) returns (UpdateGamesResp);
|
||||
rpc DelGames(DelGamesReq) returns (DelGamesResp);
|
||||
rpc GetGamesById(GetGamesByIdReq) returns (GetGamesByIdResp);
|
||||
rpc SearchGames(SearchGamesReq) returns (SearchGamesResp);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package ="./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
// ------------------------------------
|
||||
// Messages
|
||||
// ------------------------------------
|
||||
|
||||
//--------------------------------playerServices--------------------------------
|
||||
message PlayerServices {
|
||||
int64 id = 1; //id
|
||||
int64 playerId = 2; //playerId
|
||||
int64 gameId = 3; //gameId
|
||||
string title = 4; //title
|
||||
string description = 5; //description
|
||||
double price = 6; //price
|
||||
string unit = 7; //unit
|
||||
string rankRange = 8; //rankRange
|
||||
repeated string availability = 9; //availability
|
||||
double rating = 10; //rating
|
||||
bool isActive = 11; //isActive
|
||||
int64 createdAt = 12; //createdAt
|
||||
int64 updatedAt = 13; //updatedAt
|
||||
}
|
||||
|
||||
message AddPlayerServicesReq {
|
||||
int64 playerId = 1; //playerId
|
||||
int64 gameId = 2; //gameId
|
||||
string title = 3; //title
|
||||
string description = 4; //description
|
||||
double price = 5; //price
|
||||
string unit = 6; //unit
|
||||
string rankRange = 7; //rankRange
|
||||
repeated string availability = 8; //availability
|
||||
double rating = 9; //rating
|
||||
bool isActive = 10; //isActive
|
||||
int64 createdAt = 11; //createdAt
|
||||
int64 updatedAt = 12; //updatedAt
|
||||
}
|
||||
|
||||
message AddPlayerServicesResp {
|
||||
}
|
||||
|
||||
message UpdatePlayerServicesReq {
|
||||
int64 id = 1; //id
|
||||
optional int64 playerId = 2; //playerId
|
||||
optional int64 gameId = 3; //gameId
|
||||
optional string title = 4; //title
|
||||
optional string description = 5; //description
|
||||
optional double price = 6; //price
|
||||
optional string unit = 7; //unit
|
||||
optional string rankRange = 8; //rankRange
|
||||
repeated string availability = 9; //availability
|
||||
optional double rating = 10; //rating
|
||||
optional bool isActive = 11; //isActive
|
||||
optional int64 createdAt = 12; //createdAt
|
||||
optional int64 updatedAt = 13; //updatedAt
|
||||
}
|
||||
|
||||
message UpdatePlayerServicesResp {
|
||||
}
|
||||
|
||||
message DelPlayerServicesReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelPlayerServicesResp {
|
||||
}
|
||||
|
||||
message GetPlayerServicesByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetPlayerServicesByIdResp {
|
||||
PlayerServices playerServices = 1; //playerServices
|
||||
}
|
||||
|
||||
message SearchPlayerServicesReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 id = 3; //id
|
||||
int64 playerId = 4; //playerId
|
||||
int64 gameId = 5; //gameId
|
||||
string title = 6; //title
|
||||
string description = 7; //description
|
||||
double price = 8; //price
|
||||
string unit = 9; //unit
|
||||
string rankRange = 10; //rankRange
|
||||
repeated string availability = 11; //availability
|
||||
double rating = 12; //rating
|
||||
bool isActive = 13; //isActive
|
||||
int64 createdAt = 14; //createdAt
|
||||
int64 updatedAt = 15; //updatedAt
|
||||
}
|
||||
|
||||
message SearchPlayerServicesResp {
|
||||
repeated PlayerServices playerServices = 1; //playerServices
|
||||
}
|
||||
|
||||
//--------------------------------players--------------------------------
|
||||
message Players {
|
||||
int64 id = 1; //id
|
||||
int64 userId = 2; //userId
|
||||
string status = 3; //status
|
||||
double rating = 4; //rating
|
||||
int64 totalOrders = 5; //totalOrders
|
||||
int64 completedOrders = 6; //completedOrders
|
||||
int64 shopId = 7; //shopId
|
||||
repeated string tags = 8; //tags
|
||||
repeated int64 games = 9; //games
|
||||
int64 createdAt = 10; //createdAt
|
||||
int64 updatedAt = 11; //updatedAt
|
||||
int64 gender = 12; //gender
|
||||
}
|
||||
|
||||
message AddPlayersReq {
|
||||
int64 userId = 1; //userId
|
||||
string status = 2; //status
|
||||
double rating = 3; //rating
|
||||
int64 totalOrders = 4; //totalOrders
|
||||
int64 completedOrders = 5; //completedOrders
|
||||
int64 shopId = 6; //shopId
|
||||
repeated string tags = 7; //tags
|
||||
repeated int64 games = 8; //games
|
||||
int64 createdAt = 9; //createdAt
|
||||
int64 updatedAt = 10; //updatedAt
|
||||
int64 gender = 11; //gender
|
||||
}
|
||||
|
||||
message AddPlayersResp {
|
||||
}
|
||||
|
||||
message UpdatePlayersReq {
|
||||
int64 id = 1; //id
|
||||
optional int64 userId = 2; //userId
|
||||
optional string status = 3; //status
|
||||
optional double rating = 4; //rating
|
||||
optional int64 totalOrders = 5; //totalOrders
|
||||
optional int64 completedOrders = 6; //completedOrders
|
||||
optional int64 shopId = 7; //shopId
|
||||
repeated string tags = 8; //tags
|
||||
repeated int64 games = 9; //games
|
||||
optional int64 createdAt = 10; //createdAt
|
||||
optional int64 updatedAt = 11; //updatedAt
|
||||
optional int64 gender = 12; //gender
|
||||
}
|
||||
|
||||
message UpdatePlayersResp {
|
||||
}
|
||||
|
||||
message DelPlayersReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelPlayersResp {
|
||||
}
|
||||
|
||||
message GetPlayersByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetPlayersByIdResp {
|
||||
Players players = 1; //players
|
||||
}
|
||||
|
||||
message SearchPlayersReq {
|
||||
int64 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 id = 3; //id
|
||||
int64 userId = 4; //userId
|
||||
string status = 5; //status
|
||||
double rating = 6; //rating
|
||||
int64 totalOrders = 7; //totalOrders
|
||||
int64 completedOrders = 8; //completedOrders
|
||||
int64 shopId = 9; //shopId
|
||||
repeated string tags = 10; //tags
|
||||
repeated int64 games = 11; //games
|
||||
int64 createdAt = 12; //createdAt
|
||||
int64 updatedAt = 13; //updatedAt
|
||||
int64 gender = 14; //gender
|
||||
}
|
||||
|
||||
message SearchPlayersResp {
|
||||
repeated Players players = 1; //players
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------
|
||||
// Rpc Func
|
||||
// ------------------------------------
|
||||
|
||||
service playerService{
|
||||
|
||||
//-----------------------playerServices-----------------------
|
||||
rpc AddPlayerServices(AddPlayerServicesReq) returns (AddPlayerServicesResp);
|
||||
rpc UpdatePlayerServices(UpdatePlayerServicesReq) returns (UpdatePlayerServicesResp);
|
||||
rpc DelPlayerServices(DelPlayerServicesReq) returns (DelPlayerServicesResp);
|
||||
rpc GetPlayerServicesById(GetPlayerServicesByIdReq) returns (GetPlayerServicesByIdResp);
|
||||
rpc SearchPlayerServices(SearchPlayerServicesReq) returns (SearchPlayerServicesResp);
|
||||
//-----------------------players-----------------------
|
||||
rpc AddPlayers(AddPlayersReq) returns (AddPlayersResp);
|
||||
rpc UpdatePlayers(UpdatePlayersReq) returns (UpdatePlayersResp);
|
||||
rpc DelPlayers(DelPlayersReq) returns (DelPlayersResp);
|
||||
rpc GetPlayersById(GetPlayersByIdReq) returns (GetPlayersByIdResp);
|
||||
rpc SearchPlayers(SearchPlayersReq) returns (SearchPlayersResp);
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
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 {
|
||||
}
|
||||
|
||||
message DelShopInvitationsReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message DelShopInvitationsResp {
|
||||
}
|
||||
|
||||
message GetShopInvitationsByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetShopInvitationsByIdResp {
|
||||
ShopInvitations shopInvitations = 1; //shopInvitations
|
||||
}
|
||||
|
||||
message SearchShopInvitationsReq {
|
||||
int64 page = 1; //page
|
||||
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 id = 1; //id
|
||||
}
|
||||
|
||||
message DelShopPlayersResp {
|
||||
}
|
||||
|
||||
message GetShopPlayersByIdReq {
|
||||
int64 id = 1; //id
|
||||
}
|
||||
|
||||
message GetShopPlayersByIdResp {
|
||||
ShopPlayers shopPlayers = 1; //shopPlayers
|
||||
}
|
||||
|
||||
message SearchShopPlayersReq {
|
||||
int64 page = 1; //page
|
||||
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
|
||||
double rating = 6; //rating
|
||||
int64 totalOrders = 7; //totalOrders
|
||||
int64 playerCount = 8; //playerCount
|
||||
string commissionType = 9; //commissionType
|
||||
double 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
|
||||
double rating = 5; //rating
|
||||
int64 totalOrders = 6; //totalOrders
|
||||
int64 playerCount = 7; //playerCount
|
||||
string commissionType = 8; //commissionType
|
||||
double 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
|
||||
double rating = 6; //rating
|
||||
int64 totalOrders = 7; //totalOrders
|
||||
int64 playerCount = 8; //playerCount
|
||||
string commissionType = 9; //commissionType
|
||||
double 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 page = 1; //page
|
||||
int64 limit = 2; //limit
|
||||
int64 id = 3; //id
|
||||
int64 ownerId = 4; //ownerId
|
||||
string name = 5; //name
|
||||
string banner = 6; //banner
|
||||
string description = 7; //description
|
||||
double rating = 8; //rating
|
||||
int64 totalOrders = 9; //totalOrders
|
||||
int64 playerCount = 10; //playerCount
|
||||
string commissionType = 11; //commissionType
|
||||
double 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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user