Created
July 27, 2017 06:19
-
-
Save nullset2/a9bb59aa01a265c8177a9ed0aceef7d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package blog | |
class Tag { | |
String name | |
Date dateCreated | |
Date lastUpdated | |
static belongsTo = Post | |
static hasMany = [posts: Post] | |
static constraints = { | |
name maxSize: 30, blank: false, unique: true | |
} | |
String toString(){ | |
name | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment