-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dierk Koenig
committed
Oct 23, 2024
1 parent
a514743
commit f0345ad
Showing
7 changed files
with
75 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package rooms | ||
|
||
class BookingController { | ||
|
||
static scaffold = Booking | ||
|
||
} |
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,7 @@ | ||
package rooms | ||
|
||
class PersonController { | ||
|
||
static scaffold = Person | ||
|
||
} |
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,9 @@ | ||
package rooms | ||
|
||
class RoomController { | ||
|
||
static scaffold = Room | ||
|
||
|
||
|
||
} |
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,19 @@ | ||
package rooms | ||
|
||
class Booking { | ||
Person person | ||
Room room | ||
Date date | ||
String timeSlot | ||
|
||
static final AM = "08:15-11:00" | ||
static final PM1 = "12:15-15:00" | ||
static final PM2 = "15:15-18:00" | ||
|
||
static constraints = { | ||
person nullable:false | ||
room nullable:false | ||
date nullable:false | ||
timeSlot inList: [AM, PM1, PM2] | ||
} | ||
} |
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 rooms | ||
|
||
class Person { | ||
String firstName | ||
String lastName | ||
|
||
public String toString() { | ||
return firstName + " " + lastName; | ||
} | ||
} |
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,15 @@ | ||
package rooms | ||
|
||
class Room { | ||
String name | ||
Integer capacity | ||
|
||
public String toString() { | ||
return name + " (" + capacity + ")"; | ||
} | ||
|
||
static constraints = { | ||
name nullable:false, blank:false | ||
capacity min:0, nullable:true | ||
} | ||
} |
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