package models;

import play.db.ebean.Model;

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

/**
 * Created by guillaume on 05/12/13.
 */
@Entity
@Table(name = "Users")
public class User extends Model {

    @Id
    public String email;
    public String name;
    public String password;
    public Boolean isAdmin;

    public User(String email, String name, String password, Boolean isAdmin) {
        this.email = email;
        this.name = name;
        this.password = password;
        this.isAdmin = isAdmin;
    }

    public static Finder<String, User> find = new Finder<String, User>(
            String.class, User.class
    );

    public static User authenticate(String email, String password) {
        return find.where().eq("email", email)
                .eq("password", password).findUnique();
    }

    public static void delete(User user) {
        user.delete();
    }

    public static void modify(User user, String email, String name, String password, Boolean isAdmin){
        user.email = email;
        user.name = name;
        user.password = password;
        user.isAdmin = isAdmin;
        user.update();
    }

}

@@ -39,16 +39,49 @@
 Model;%0A%0A
+import javax.persistence.Column;%0A
 import j
@@ -358,24 +358,55 @@
 ng password;
+%0A%0A    @Column(name = %22isAdmin%22)
 %0A    public 

Fix users