syntax = "proto3"; package gamelang; option go_package = "/gamelang/jeopardypb"; message Challenge { uint32 id = 1; string description = 2; string clue = 3; string solution = 4; string url = 5; uint32 points = 6; bool checked = 7; repeated string checker = 8; repeated string moderators = 9; } message Category { uint32 id = 1; string name = 2; string description = 3; repeated Challenge challenges = 4; repeated string moderators = 5; } message Round { uint32 id = 1; string name = 2; string description = 3; repeated Category categories = 4; repeated uint32 curcats = 5; repeated string moderators = 6; } message Option { string key = 1; string value = 2; enum TypeEnum { STRING = 0; BOOL = 1; INT = 2; } TypeEnum type = 3; bool bool = 4; uint32 int = 5; } message Event { string type = 1; string game = 2; string value = 3; string gamename = 4; string username = 5; repeated string neighborgames = 6; } service EventService { rpc Inform (Event) returns (Event); } message Player { uint32 id = 1; enum type { SHOWMASTER = 0; CONTESTANT = 1; VIEWER = 2; } string name = 2; uint32 points = 3; } message Jeopardy { uint32 id = 1; string name = 2; repeated Option options = 3; repeated Round rounds = 4; uint32 curround = 5; repeated Player players = 6; bool started = 7; bool finished = 8; string winner = 9; repeated string moderators = 10; } service JeopardyService { rpc CreateJeopardy (Jeopardy) returns (Jeopardy); rpc UpdateJeopardy (Jeopardy) returns (Jeopardy); rpc DeleteJeopardy (Jeopardy) returns (Jeopardy); rpc GetJeopardy (Jeopardy) returns (Jeopardy); rpc ListJeopardy (Jeopardy) returns (stream Jeopardy); rpc CreateRound (Round) returns (Round); rpc UpdateRound (Round) returns (Round); rpc DeleteRound (Round) returns (Round); rpc GetRound (Round) returns (Round); rpc ListRound (Round) returns (stream Round); rpc CreateChallenge (Challenge) returns (Challenge); rpc UpdateChallenge (Challenge) returns (Challenge); rpc DeleteChallenge (Challenge) returns (Challenge); rpc GetChallenge (Challenge) returns (Challenge); rpc ListChallenge (Challenge) returns (stream Challenge); }