From the course: Build Spring Boot Apps with the Kotlin Programming Language

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Mappings between entities

Mappings between entities

- [Instructor] So I hope you got that working. The next thing we'd like to do is start creating the ability to have bookings for our performances. I'm going to pause the application, stop the application running. I suggest you do exactly the same because we've got quite a bit of coding to do here and I don't want it to be constantly rebuilding in the background because we'll get lots of errors until we are at a point where our code is really useable. So the idea is that a booking is going to store information about which performance and which seats and which customer is making the booking. Let's go and start creating the class that's going to be the entity for our booking and so we'll put that in the domain package and we'll call this class booking and once again, it's going to be a data class. We'll call it booking and we're going to obviously put some parameters in here. So the first thing is we'll certainly have an ID and I think I'll be a bit lazy and just copy this from…

Contents