Best Practices for Modeling Stores, Partners, and Services in Strapi

Hello everyone,

I’m currently developing a web application that involves managing stores, partners, and services, and I’m looking for advice on how to best model these relationships in Strapi. I have intentionally simplified the concept and the entities for the purpose of this post. Here’s a brief overview of the requirements:

  1. Stores: These can be located in various cities.
  2. Partners: Partners are assigned to different stores. For example, a dry cleaning service available in City A cannot offer its services in City B. However, a partner can be associated with multiple nearby stores.
  3. Services: The services provided by partners can either be permanent or temporary. For temporary services, I need to specify a start and end date for each store associated with the partner. Start and end dates will be different per service per store.

Given these requirements, I need to ensure that the relationships between stores, partners, and services are correctly set up to allow for efficient querying and management.

Specific Questions:

  • How should I structure the models to represent these relationships?
  • What is the best way to handle the temporal aspect of the services, ensuring that I can define different timeframes for each store associated with a partner?
  • In the future, store users will need to list both temporary and permanent services for the store they are associated with. How can I best implement this feature?

I appreciate any recommendations or examples from your own experiences with similar scenarios.

Thank you!