Introduction #
this Section’s purpose is to take you through the process of building a book store management app.
the example is available on wizzdi cloud public marketplace
App Overview #
![App Overview](https://wizzdi.com/wp-content/uploads/2024/04/app-overview-1-1024x504.png)
Domain Model #
in this part we will create the domain model to describe the normal data that is handled in a typical book store: Book,Author,BookLend,Genre,Subscription,Person
the Domain Model Editor is a powerful tool that allows creating connection between entities ,setting indexes , creating inheritance relationship and much more.
for a more extensive view of the Domain Model Editor check its documentation.
The Person Entity #
The Person Entity will be used as a Mapped Super Class for the Customer and the Author Entities , a Mapped Super Class is kind of a Mold for Other Entities , this allows us to have the name ,id , birthDate of Person in the Author and Customer Entities.
The Author Entity #
The Author Entity defines an author , it is connected with the book entity in a many-to-one relationship since Author has Many Books and in our example Book may have only single author.
if we did wanted to support multiple authors for a book we would need an intermediate entity called BookToAuthor which will define a many-to-many relationship between book and author
The Genre Enum #
the Genre Enum is a list of predefined values that will represent the possible Genres we support in our Book Store. we may add more to the list . for more flexibility we should have defined this as an Entity.
The BookLend Entity #
The BookLend Entity will be used to represent the fact that a Book was taken by a Customer , this will have the date it was taken as well as the date it should be returned and the date of actual return.
Exposed APIs #
In this section we can see the automatically CRUD (create, read, update and Delete) APIs.
more options available here such as adding a new custom endpoint , defining if the project is a contract-first of domain-first and much more.
check the Exposed API Documentation for an extensive view of it.
Review #
Review The Code #
now the code is available, this example code can be found here.
Review The App’s API Docs #
the swagger docs for the app is available here.