package wissolsoft.porada.webapp.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="user_vote")
public class DeputatVote {

    public enum Value {
        /** Утримався */
        ABSTAIN,

        /** За */
        FOR,

        /** Проти  */
        AGAINST,

        /** Відсутній */
        ABSENT,

        /** Не голосував */
        DIDNT_VOTE
    }

    @Id
    @GeneratedValue
    private long id;

    @ManyToOne
    private Law law;

    @ManyToOne
    private Deputat deputat;

    private Value value;

    public long getId() {
        return id;
    }

    public Law getLaw() {
        return law;
    }

    public Deputat getDeputat() {
        return deputat;
    }

    public Value getValue() {
        return value;
    }

    public void setLaw(Law law) {
        this.law = law;
    }

    public void setDeputat(Deputat deputat) {
        this.deputat = deputat;
    }

    public void setValue(Value value) {
        this.value = value;
    }
}

@@ -660,16 +660,191 @@
 value;%0A%0A
+    private String note;%0A%0A    private boolean remote;%0A%0A    public String getNote() %7B%0A        return note;%0A    %7D%0A%0A    public boolean isRemote() %7B%0A        return remote;%0A    %7D%0A%0A
     publ
@@ -857,24 +857,24 @@
 g getId() %7B%0A
-
         retu
@@ -1056,32 +1056,185 @@
 n value;%0A    %7D%0A%0A
+    public void setNote(String note) %7B%0A        this.note = note;%0A    %7D%0A%0A    public void setRemote(boolean remote) %7B%0A        this.remote = remote;%0A    %7D%0A%0A
     public void 
@@ -1435,16 +1435,204 @@
  value;%0A
-
     %7D%0A
+%0A    @Override%0A    public String toString() %7B%0A        return %22DeputatVote %5Bdeputat=%22 + deputat + %22, value=%22 + value%0A                + %22, note=%22 + note + %22, remote=%22 + remote + %22%5D%22;%0A    %7D%0A%0A
 %7D%0A

Add fields to DeputatVote entity