syntax = "proto3";

option go_package = "htwkalender/common/modules";

service ModuleService {
  rpc GetModule(GetModuleRequest) returns (GetModuleResponse) {}
  rpc GetModules(GetModulesRequest) returns (GetModulesResponse) {}
  rpc GetEventsForModules(GetModulesRequest) returns (GetEventsResponse) {}
}

message Event {
  string uuid = 1;
  string day = 2;
  string week = 3;
  string start = 4;
  string end = 5;
  string name = 6;
  string eventType = 7;
  string compulsory = 8;
  string prof = 9;
  string rooms = 10;
  string notes = 11;
  string bookedAt = 12;
  string course = 13;
  string semester = 14;
}

message Module {
  string uuid = 1;
  string name = 2;
  string prof = 3;
  string course = 4;
  string semester = 5;
  repeated Event events = 6;
}

message GetModuleRequest {
  string uuid = 1;
}

message GetModulesRequest {
  repeated string uuids = 1;
}

message GetModuleResponse {
  Module module = 1;
}

message GetModulesResponse {
  repeated Module modules = 1;
}

message GetEventsResponse {
  repeated Event events = 1;
}