class Person {
	static transients = ['pass']
	static hasMany = [authorities: Authority]
	static belongsTo = Authority

	String loginName
	String firstName
    String lastName
    String employeeID

	/** MD5 Password */
	String password

	/** enabled */
	boolean isActive = true

	String email
	boolean emailShow = true

	/** description */
	String description = ''

	/** plain password to create a MD5 password */
	String pass = '[secret]'

	static constraints = {
		loginName(blank: false, unique: true)
		firstName(blank: false)
        lastName(blank: false)
		password(blank: false)
        employeeID(blank: true, nullable:true)
	}

    //Overriding the default toString method
    String toString() {"${this.firstName} ${this.lastName}"}
}
