add background

This commit is contained in:
2026-09-06 01:03:55 +07:00
parent 56ab0c2c15
commit 13aad8ff4c
46 changed files with 192 additions and 46 deletions
+27 -5
View File
@@ -397,6 +397,18 @@ service EveningDetectiveServer {
};
}
// Загрузить файл через UploadFile, затем передать его имя; пустое имя удаляет фон дела.
rpc UpdateScenarioBackground(UpdateScenarioBackgroundReq) returns (UpdateScenarioBackgroundRsp) {
option (google.api.http) = {
put : "/api/scenarios/{id}/background"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Сценарии";
summary: "Установить или удалить фон дела";
};
}
rpc UpdateScenarioIntro(UpdateScenarioIntroReq) returns (UpdateScenarioIntroRsp) {
option (google.api.http) = {
put : "/api/scenarios/{id}/introduction"
@@ -880,6 +892,7 @@ message Scenario {
}
message Story {
string background = 4;
Introduction introduction = 2;
repeated Place places = 1;
repeated Question questions = 3;
@@ -1138,16 +1151,16 @@ message ResultsQuestion {
// Строка итоговой таблицы: команда, баллы по вопросам, сумма и место.
message TeamResult {
Team team = 1;
repeated AnswerScore answers = 2;
Team team = 1;
repeated AnswerScore answers = 2;
// Сумма баллов по всем вопросам сценария (неоценённые считаются как 0)
int32 total_score = 3;
int32 total_score = 3;
// Место в итоговой таблице: команды с одинаковой суммой баллов и
// одинаковым числом ходов занимают одно место (следующее пропускается)
int32 place = 4;
int32 place = 4;
// Количество ходов команды (дублирует team.actions_count для удобства
// таблицы; участвует в тай-брейке при равенстве суммы баллов)
int32 actions_count = 5;
int32 actions_count = 5;
}
message GetGameResultsRsp {
@@ -1312,3 +1325,12 @@ message SetTeamAnswerScoreReq {
message SetTeamAnswerScoreRsp {
string error = 1;
}
message UpdateScenarioBackgroundReq {
int32 id = 1;
string background = 2;
}
message UpdateScenarioBackgroundRsp {
string error = 1;
}