Skip to content

Instantly share code, notes, and snippets.

@nazt
Created April 8, 2010 14:16
Show Gist options
  • Save nazt/360107 to your computer and use it in GitHub Desktop.
Save nazt/360107 to your computer and use it in GitHub Desktop.
class AirportMapping{
static constraints = {
name()
iata(maxSize:3)
state(maxSize:2)
lat()
lng()
}
static mapping = {
table "usgs_airports"
version false
columns {
id column: "airport_id"
name column: "airport_name"
iata column: "locid"
state column: "state"
lat column: "latitude"
lng column: "longitude"
}
}
String name
String iata
//String city
String state
//String country = "US"
String lat
String lng
String toString(){
"${iata} - ${name}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment