As you can see, our entities have relationships with each other. So we need to create relationships with annotations.
In the three entity files (model files in my project) you can see annotations referring to the relationships. Also, you can see the apis I wrote in the three controller files.
Let's take a deep look on our API's.
USAGES
1-) Get Available Products
+ localhost:8080/products/available
Lists products that are not expired. (Including null dates!)
2-) Get Expired Products
+ localhost:8080/products/expired
Lists products that are expired.
3-) Get comments between dates for given product id