Advertisement
Guest User

Untitled

a guest
Jul 15th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.68 KB | None | 0 0
  1. @JSExport("igs.User")
  2. case class User(
  3.   @(Transient @field) _id: String,
  4.   @(Transient @field) _name: String,
  5.   @(Transient @field) _email: String,
  6.   @(Transient @field) _password: String) extends Model
  7.   with Summarizable[User, UserSummary] {
  8.  
  9.   require(_id != null, "Missing argument '_id'.")
  10.   require(_name != null, "Missing argument '_name'.")
  11.   require(_email != null, "Missing argument '_email'.")
  12.   require(_password != null, "Missing argument '_password'.")
  13.  
  14.   @JSExport
  15.   val id = _id
  16.  
  17.   @JSExport
  18.   val name = _name
  19.  
  20.   @JSExport
  21.   val email = _email
  22.  
  23.   @JSExport
  24.   val password = _password
  25.  
  26.   override def summarize() = new UserSummary(id, name, email)
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement