package GameNationBackEnd.Documents;

import com.sun.istack.internal.NotNull;
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 17/11/2016.
 */
@Document
public class UserGame {

    @Id
    private String _id;

    @DBRef
    @NotNull
    private User user;

    @DBRef
    @NotNull
    private Game game;

    private Integer skill_level;

    public UserGame(){
        user = new User();
        game = new Game();
    }

    public UserGame(User user, Game game, Integer skill_level){
        this.user = user;
        this.game = game;
        this.skill_level = skill_level;
    }

    public String getId() {
        return _id;
    }
    //public User getUser(){return this.user; }
    public Game getGame(){return this.game; }
    public int getSkill_level(){return  this.skill_level; }

    public void setUser(User user){ this.user=user; }
    public void setGame(Game game){ this.game=game; }
    public void setSkill_level(Integer skill_level){this.skill_level = skill_level; }


}

@@ -42,39 +42,52 @@
 ort 
-com.sun.istack.internal.NotNull
+org.hibernate.validator.constraints.NotBlank
 ;%0Aim
@@ -376,36 +376,37 @@
  @DBRef%0A    @Not
-Null
+Blank
 %0A    private Use
@@ -437,12 +437,13 @@
 @Not
-Null
+Blank
 %0A   

Fix NotNull import