- update: major refactor of the database-service to make it easy to add newer api services
- add: character database api
This commit is contained in:
43
proto/character_db_api.proto
Normal file
43
proto/character_db_api.proto
Normal file
@@ -0,0 +1,43 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package character_db_api;
|
||||
|
||||
service CharacterService {
|
||||
rpc GetCharacter (CharacterRequest) returns (CharacterResponse);
|
||||
rpc CreateCharacter (CreateCharacterRequest) returns (CharacterResponse);
|
||||
rpc DeleteCharacter (DeleteCharacterRequest) returns (Empty);
|
||||
}
|
||||
|
||||
message CharacterRequest {
|
||||
int32 character_id = 1;
|
||||
}
|
||||
|
||||
message CreateCharacterRequest {
|
||||
int32 user_id = 1;
|
||||
string name = 2;
|
||||
string inventory = 3; // JSON serialized
|
||||
string stats = 4; // JSON serialized
|
||||
string looks = 5; // JSON serialized
|
||||
string position = 6; // JSON serialized
|
||||
}
|
||||
|
||||
message DeleteCharacterRequest {
|
||||
int32 character_id = 1;
|
||||
}
|
||||
|
||||
message CharacterResponse {
|
||||
int32 id = 1;
|
||||
int32 user_id = 2;
|
||||
string name = 3;
|
||||
int32 level = 4;
|
||||
int64 experience = 5;
|
||||
string inventory = 6;
|
||||
string stats = 7;
|
||||
string looks = 8;
|
||||
string position = 9;
|
||||
string created_at = 10;
|
||||
string updated_at = 11;
|
||||
bool is_active = 12;
|
||||
}
|
||||
|
||||
message Empty {}
|
||||
Reference in New Issue
Block a user