Skip to content

Commit

Permalink
TryBooking homework setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Dierk Koenig committed Nov 1, 2023
1 parent 0671dc5 commit 63624cb
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
19 changes: 19 additions & 0 deletions grails-app/controllers/rooms/BookingController.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package rooms

class BookingController {

static scaffold = Booking

def tryBookings() {

// make rooms
// make people
// make bookings

// who booked room 1 ?

// which rooms have been booked by person 1?


}
}
6 changes: 6 additions & 0 deletions grails-app/controllers/rooms/PersonController.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package rooms

class PersonController {

static scaffold = Person
}
11 changes: 11 additions & 0 deletions grails-app/domain/rooms/Booking.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package rooms

class Booking {

Person person
Room room
Date bookingDate

static constraints = {
}
}
11 changes: 11 additions & 0 deletions grails-app/domain/rooms/Person.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package rooms

class Person {
String firstName
String lastName

String toString() { "$firstName $lastName" }

static constraints = {
}
}

0 comments on commit 63624cb

Please sign in to comment.