package org.yraft;

public enum Messages {
  VoteRequest,
  VoteResponse,
  AppendEntriesRequest,
  AppendEntriesResponse,
  HeartBeat
}

@@ -45,24 +45,27 @@
  VoteRequest
+(1)
 ,%0A  VoteResp
@@ -64,24 +64,27 @@
 VoteResponse
+(2)
 ,%0A  AppendEn
@@ -95,16 +95,19 @@
 sRequest
+(3)
 ,%0A  Appe
@@ -123,16 +123,19 @@
 Response
+(4)
 ,%0A  Hear
@@ -139,11 +139,140 @@
 eartBeat
+(5);%0A%0A  private final int id;%0A%0A  private Messages(int id) %7B%0A    this.id = id;%0A  %7D%0A%0A  public int getId() %7B%0A    return this.id;%0A  %7D
 %0A%7D%0A

add id field for Messages