syntax = "proto3"; package corruption.v1; import "common.proto"; option go_package = "github.com/corruption/api/v1"; option java_multiple_files = true; option java_outer_classname = "CorruptionCaseProto"; option java_package = "com.corruption.api.v1"; // Corruption Case service definition service CorruptionCaseService { // Get a list of corruption cases with pagination rpc ListCorruptionCases(ListCorruptionCasesRequest) returns (ListCorruptionCasesResponse) {} // Get a single corruption case by ID rpc GetCorruptionCase(GetCorruptionCaseRequest) returns (GetCorruptionCaseResponse) {} } // Request message for ListCorruptionCases message ListCorruptionCasesRequest { // Pagination parameters PaginationRequest pagination = 1; // Optional filter by politician ID optional int32 politician_id = 2; // Optional filter by category optional string category = 3; // Optional filter by status optional string status = 4; } // Response message for ListCorruptionCases message ListCorruptionCasesResponse { // List of corruption cases repeated CorruptionCase corruption_cases = 1; // Pagination metadata PaginationResponse pagination = 2; } // Request message for GetCorruptionCase message GetCorruptionCaseRequest { // The ID of the corruption case to retrieve int32 id = 1; } // Response message for GetCorruptionCase message GetCorruptionCaseResponse { // The requested corruption case CorruptionCase corruption_case = 1; } // Corruption Case message message CorruptionCase { // The unique identifier for the corruption case int32 id = 1; // The title of the corruption case string title = 2; // The description of the corruption case string description = 3; // The category of the corruption case string category = 4; // The amount involved in the corruption case double amount = 5; // The start date of the corruption case string start_date = 6; // The end date of the corruption case (if applicable) optional string end_date = 7; // The status of the corruption case string status = 8; // The location where the corruption case occurred string location = 9; // The number of politicians involved in this case int32 politician_count = 10; // The number of evidence documents associated with this case int32 evidence_count = 11; // The number of timeline events associated with this case int32 timeline_event_count = 12; // Creation timestamp Timestamp created_at = 13; // Last update timestamp Timestamp updated_at = 14; } // Case Involvement message message CaseInvolvement { // The unique identifier for the case involvement int32 id = 1; // The politician ID int32 politician_id = 2; // The corruption case ID int32 corruption_case_id = 3; // The role of the politician in the corruption case string role = 4; // Additional details about the involvement string details = 5; // Creation timestamp Timestamp created_at = 6; // Last update timestamp Timestamp updated_at = 7; }