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 bool 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 { optional int64 page = 1; //page optional int64 limit = 2; //limit optional int64 id = 3; //id optional int64 userId = 4; //userId optional string status = 5; //status optional double rating = 6; //rating optional int64 totalOrders = 7; //totalOrders optional int64 completedOrders = 8; //completedOrders optional int64 shopId = 9; //shopId repeated string tags = 10; //tags repeated int64 games = 11; //games optional int64 createdAt = 12; //createdAt optional int64 updatedAt = 13; //updatedAt optional 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); }