Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/satish-kg/book_my_movie

A backend application built using Java, Spring Boot and Maven which uses MySQL as database. The list of api's are provided below in README file (⬇️please scroll down⬇️).
https://github.com/satish-kg/book_my_movie

jakarta-persistence java lombok lombok-maven mysql mysql-database spring spring-boot spring-mvc springboot springframework

Last synced: about 1 month ago
JSON representation

A backend application built using Java, Spring Boot and Maven which uses MySQL as database. The list of api's are provided below in README file (⬇️please scroll down⬇️).

Awesome Lists containing this project

README

        

A backend application built using Java, Spring Boot and Maven which uses MySQL as database.
Libraries used : jakarta.persistence, org.springframework, lombok. APIs and entity list are provided below.

The APIs created are :
1. (POST) addMovie API : Accepts a MovieEntryDTO and returns a response entity after converting MovieEntryDTO to movieEntity and saving it.
2. (POST) addShow API : Accepts a ShowEntryDTO and returns a response entity after converting ShowEntryDTO to showEntity and saving it.
3. (POST) addTheater API : Accepts a TheaterEntryDTO and returns a response entity after converting TheaterEntryDTO to theaterEntity and saving it.
4. (POST) bookTicket API : Accepts a TicketEntryDTO and returns a response entity after converting TicketEntryDTO to ticketEntity and saving it.
5. (POST) addUser API : Accepts a UserEntryDTO and returns a response entity after converting UserEntryDTO to userEntity and saving it.

The Entities and their relations are :
1. MovieEntity : @OneToMany(mappedBy = "movieEntity", cascade = CascadeType.ALL)
private List showEntityList = new ArrayList<>();
2. ShowEntity : @OneToMany(mappedBy = "showEntity", cascade = CascadeType.ALL)
private List listOfShowSeats = new ArrayList<>();
@OneToMany(mappedBy = "showEntity", cascade = CascadeType.ALL)
private List listOfBookedTickets = new ArrayList<>();
3. ShowSeatEntity (used for ticket booking) :
@ManyToOne
@JoinColumn
private ShowEntity showEntity;
4. TheaterEntity : @OneToMany(mappedBy = "theaterEntity", cascade = CascadeType.ALL)
private List showEntityList = new ArrayList<>();
@OneToMany(mappedBy = "theaterEntity", cascade = CascadeType.ALL)
private List theaterSeatEntityList = new ArrayList<>();
5. TheaterSeatEntity (used for ticket booking) :
@ManyToOne
@JoinColumn
private TheaterEntity theaterEntity;
6. TicketEntity : @ManyToOne
@JoinColumn
private UserEntity userEntity;
@ManyToOne
@JoinColumn
private ShowEntity showEntity;
7. UserEntity : @OneToMany(mappedBy = "userEntity", cascade = CascadeType.ALL)
private List bookedTicketList = new ArrayList<>();