extending play.db.jpa.Model
package models; import java.util.*; import javax.persistence.*; import play.db.jpa.*; @Entity
@Table(name="user_table") public class User extends Model { public String email; public String password; public String fullname; public boolean isAdmin; public User(String email, String password, String fullname) { = email; this.password = password; this.fullname = fullname; } }

PostgreSQL SQL
CREATE TABLE user_table
  id bigint NOT NULL,
  email character varying(255),
  fullname character varying(255),
  isadmin boolean NOT NULL,
  "password" character varying(255),
  CONSTRAINT user_table_pkey PRIMARY KEY (id)

Bean Validation
@Column(name="text", nullable=false, length=100)

public String someText;

Save with Enumeration Type Field and Custom i18n Messages with overriding toString

public class User extends Model {
    public Role role;

public enum Role {
    MIS {
        public String toString(){
            return Messages.get("MIS");
    }, CEO {
        public String toString(){
            return Messages.get("CEO");


MIS = MIS系統工程師