-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding some contstraints and relationships in the domain model
- Loading branch information
Adam Creeger
committed
Aug 15, 2011
1 parent
28b400d
commit 019a122
Showing
10 changed files
with
47 additions
and
72 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
target | ||
cafe-centro*.i* | ||
*.iml | ||
data |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.cafeCentro | ||
|
||
class Artist { | ||
|
||
String name; | ||
|
||
static constraints = { | ||
name(blank: false) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.cafeCentro | ||
|
||
class Event { | ||
|
||
static hasMany = [artists:Artist] | ||
|
||
Date lastUpdated | ||
Date dateCreated | ||
|
||
Date startTime | ||
Venue venue | ||
String name | ||
|
||
static constraints = { | ||
startTime(min: new Date()) | ||
name(blank: false) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.cafeCentro | ||
|
||
class Venue { | ||
|
||
String name | ||
String address1 | ||
String address2 | ||
String city | ||
String region | ||
String zipCode | ||
String coords | ||
|
||
static constraints = { | ||
zipCode(matches: /\d{5}/) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.