package GameNationBackEnd.Documents;

import com.sun.org.apache.xpath.internal.operations.Bool;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * Created by tijs on 30/11/2016.
 */
@Document
public class Friend {
    @Id
    private String id;

    @DBRef
    private User sender;

    @DBRef
    private User receiver;

    private Boolean accepted;
    private Boolean sended;

    public Friend(){
        sender = new User();
        receiver = new User();
    }

    public Friend(User sender, User receiver){
        this.sender = sender;
        this.receiver = receiver;
        this.sended = true;
    }

    public User getSender() {
        return sender;
    }
    public User getReceiver() {
        return receiver;
    }
    public String getId() {
        return id;
    }
    public Boolean isAccepted(){ return accepted; }
    public Boolean getSended(){ return sended; }

    public void setAccepted(Boolean a){ this.accepted = a; }
    public void setSended(Boolean s){ this.sended = s; }

}

@@ -634,16 +634,128 @@
 eceiver)
+ %7B%0A        this(sender, receiver, false);%0A    %7D%0A%0A    public Friend(User sender, User receiver, boolean accepted)
 %7B%0A      
@@ -839,16 +839,51 @@
  = true;
+%0A%0A        this.accepted = accepted;
 %0A    %7D%0A%0A

Add overload method for easier immediate friend accepting in dev