Skip to content

Instantly share code, notes, and snippets.

@boyzoid
Created August 15, 2012 15:40
Show Gist options
  • Save boyzoid/3361089 to your computer and use it in GitHub Desktop.
Save boyzoid/3361089 to your computer and use it in GitHub Desktop.
User Domain Class
package com.golfleague
class User {
String id
String firstName
String lastName
String username
String password
String emailAddress
Boolean isAdmin
UserType userType
Integer currentHandicap
static hasMany = [seasons: Season, scores: Score]
static mapping = {
sort lastName: "asc", firstName: "asc"
}
static constraints = {
id maxSize: 32
firstName maxSize: 30
lastName maxSize: 30
username maxSize: 30
password maxSize: 255
emailAddress maxSize: 100, email: true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment