package GameNationBackEnd.Documents;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

/**
 * Created by tijs on 16/11/2016.
 */
@Document
public class Game implements Comparable<Game>{
    @Id
    private String id;

    @Indexed(unique = true)
    @NotBlank(message = "Name must not be blank")
    private String name;

    @NotBlank(message = "Description must not be blank")
    private String description;

    @NotBlank(message = "Image must not be blank")
    private String imageName;

    public Game(){}

    public Game(String name, String description, String imageName) {
        this.name = name;
        this.description = description;
        this.imageName = imageName;
    }

    public String GetImagePath(){
        return "./img/" + imageName;
    }
    public String getId() {
        return id;
    }
    public String getName() {
        return name;
    }
    public String getDescription() {
        return description;
    }
    public String getImageName(){ return imageName; }


    public boolean equals(Game g){
        return this.id.equals(g.id);
    }

    @Override
    public int compareTo(Game g){
        return this.name.compareTo(g.name);
    }



}

@@ -448,35 +448,8 @@
 ame 
-implements Comparable%3CGame%3E
 %7B%0A  
@@ -957,85 +957,8 @@
  %7D%0A%0A
-    public String GetImagePath()%7B%0A        return %22./img/%22 + imageName;%0A    %7D%0A
     
@@ -1271,109 +1271,7 @@
    %7D
-%0A%0A    @Override%0A    public int compareTo(Game g)%7B%0A        return this.name.compareTo(g.name);%0A    %7D%0A%0A%0A
 %0A%7D%0A

Remove unused methods from Game document