Created
March 8, 2019 03:48
-
-
Save kevintanhongann/69383c3387cb049ee72a0e2216cb4c0e to your computer and use it in GitHub Desktop.
example-micronaut-gorm code snippets 2
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 example.micronaut.gorm.domain | |
import grails.gorm.annotation.Entity | |
@Entity | |
class Person { | |
String name | |
String email | |
static constraints = { | |
name nullable: false | |
email nullable: false, email: true | |
} | |
static mapping = { | |
autoTimestamp true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment