82 lines
2.0 KiB
Protocol Buffer
82 lines
2.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package review;
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/empty.proto";
|
|
|
|
option go_package = "pkg/api/review";
|
|
|
|
service ReviewService {
|
|
rpc ListSubmissionsForReview(ListSubmissionsForReviewRequest) returns (ListSubmissionsForReviewResponse);
|
|
rpc GetSubmissionForReview(GetSubmissionForReviewRequest) returns (SubmissionForReview);
|
|
rpc EvaluateSubmission(EvaluateSubmissionRequest) returns (EvaluateSubmissionResponse);
|
|
rpc ReleaseSubmission(ReleaseSubmissionRequest) returns (google.protobuf.Empty);
|
|
}
|
|
|
|
enum ReviewStatus {
|
|
REVIEW_STATUS_UNSPECIFIED = 0;
|
|
REVIEW_STATUS_PENDING = 1;
|
|
REVIEW_STATUS_IN_REVIEW = 2;
|
|
REVIEW_STATUS_COMPLETED = 3;
|
|
REVIEW_STATUS_REJECTED = 4;
|
|
}
|
|
|
|
message CriteriaMark {
|
|
string slug = 1;
|
|
double mark = 2;
|
|
}
|
|
|
|
message SubmissionSummary {
|
|
string id = 1;
|
|
string competition_id = 2;
|
|
string task_id = 3;
|
|
string competition_title = 4;
|
|
string task_title = 5;
|
|
google.protobuf.Timestamp submitted_at = 6;
|
|
ReviewStatus review_status = 7;
|
|
}
|
|
|
|
message SubmissionForReview {
|
|
string id = 1;
|
|
string competition_id = 2;
|
|
string task_id = 3;
|
|
string content = 4;
|
|
string description = 5;
|
|
ReviewStatus review_status = 6;
|
|
google.protobuf.Timestamp submitted_at = 7;
|
|
optional google.protobuf.Timestamp checked_at = 8;
|
|
}
|
|
|
|
message ListSubmissionsForReviewRequest {
|
|
int32 page_size = 1;
|
|
int32 page_token = 2;
|
|
|
|
optional ReviewStatus status = 3;
|
|
}
|
|
message ListSubmissionsForReviewResponse {
|
|
repeated SubmissionSummary submissions = 1;
|
|
int32 total_count = 2;
|
|
int32 next_page_token = 3;
|
|
}
|
|
|
|
message GetSubmissionForReviewRequest {
|
|
string submission_id = 1;
|
|
}
|
|
|
|
message EvaluateSubmissionRequest {
|
|
string submission_id = 1;
|
|
int32 earned_points = 2;
|
|
string reviewer_comment = 3;
|
|
repeated CriteriaMark marks = 4;
|
|
}
|
|
message EvaluateSubmissionResponse {
|
|
string submission_id = 1;
|
|
int32 final_score = 2;
|
|
ReviewStatus new_status = 3;
|
|
}
|
|
|
|
message ReleaseSubmissionRequest {
|
|
string submission_id = 1;
|
|
}
|