syntax = "proto3";

package proto.ervu.rp.summons;

option java_multiple_files = true;
option java_outer_classname = "SummonsResponse";

message Sig {
  string name = 1;
  bytes file = 2;
}

message SummonsDocumentCopy {
  string name = 1;
  bytes file = 2;
}

message DocumentsSummons {
  SummonsDocumentCopy summonsDocumentCopy = 1;
  Sig sig = 2;
}

message MeasuresTemporary {
    bool useFact = 1;
    string startDate = 2;
    string measureCode = 3;
    string measureName = 4;
    bool measureStatus = 5;
}

message MeasuresTemporaryPackage {
    bool useFactPackage = 1;
    string measureNumber = 2;
    string militaryCommissariatName = 3;
    string applicationPackageStartDate = 4;
    string packageStartDate = 5;
    bool packageMeasureStatus = 6;
    repeated MeasuresTemporary measuresTemporaries = 7;
}

message SummonsInfo {
    string summonsId = 1;
    bool summonsUseFact = 2;
    string summonsSeries = 3;
    string summonsNumber = 4;
    string reasonCode = 5;
    string reasonName = 6;
    string militaryCommissariatName = 7;
    string militaryCommissariatAddress = 8;
    string visitDate = 9;
    string visitTime = 10;
    bool validityPeriodSummons = 11;
    string summonsStatusCode = 12;
    string summonsStatusName = 13;
    string placementDateSummons = 14;
    string estimatedDateSummons = 15;
    string deliveryTypeSummonsCode = 16;
    string deliveryTypeSummonsName = 17;
    string militaryComissar = 18;
    string militaryComissarFirstName = 19;
    string militaryComissarMiddleName = 20;
    repeated MeasuresTemporaryPackage measuresTemporaryPackages = 21;
    repeated DocumentsSummons documentsSummons = 22;
}

message RecruitmentInfo {
  string militaryCommissariatCode = 1;
  string militaryCommissariatName = 2;
  string recruitmentStatusCode = 3;
  string recruitmentStatusName = 4;
  string recruitmentStart = 5;
  string recruitmentReasonCode = 6;
  string recruitmentReasonName = 7;
  bool recruitmentDocStatus = 8;
  string recruitmentDocDate = 9;
}

message ResponseDataAddress {
  string addressCode = 1;
  string addressTypeName = 2;
  string addressReg = 3;
  string addressRegDateStart = 4;
  string addressRegDateEnd = 5;
}

message SummonsResponseData {
  string lastName = 1;
  string firstName = 2;
  string middleName = 3;
  string birthDate = 4;
  string type = 5;
  string series = 6;
  string number = 7;
  string issueDate = 8;
  string issueOrg = 9;
  string issueIdCode = 10;
  bool status = 11;
  string idERN = 12;
  repeated ResponseDataAddress addresses = 13;
  RecruitmentInfo recruitmentInfo = 14;
  repeated SummonsInfo summonsInfos = 15;
};

message SummonsErrorResponseData {
  string code = 1;
  string name = 2;
}
