##### Coverage Report - models.User

Classes in this File | Line Coverage | Branch Coverage | Complexity
User |
100 % | 7/7
N/A | N/A
| 1.0;1

1 |  |
     package models;
2 |  |
3 |  |
     import java.util.*;
4 |  |
     import javax.persistence.*;
5 |  |
6 |  |
     import play.db.jpa.*;
7 |  |
     import play.data.validation.*;
8 |  |
9 |  |
     @Entity
10 |  |
     public class User extends Model {
11 |  |
12 |  |
         @Email
13 |  |
         @Required
14 |  |
         public String email;
15 |  |
16 |  |
         @Required
17 |  |
         public String password;
18 |  |
19 |  |
         public String fullname;
20 |  |
21 |  |
         public boolean isAdmin;
22 |  |
23 | 18 |
         public User(String email, String password, String fullname) {
24 | 18 |
             this.email = email;
25 | 18 |
             this.password = password;
26 | 18 |
             this.fullname = fullname;
27 | 18 |
         }
28 |  |
29 |  |
         public static User connect(String email, String password) {
30 | 21 |
             return find("byEmailAndPassword", email, password).first();
31 |  |
         }
32 |  |
33 |  |
         public String toString() {
34 | 43 |
             return email;
35 |  |
         }
36 |  |
37 |  |
     }