mitodl / open-discussions

BSD 3-Clause "New" or "Revised" License
10 stars 2 forks source link

Unified Open R&D: compare program/course models in Open and our other projects #4127

Open rhysyngsun opened 1 year ago

rhysyngsun commented 1 year ago

See also: https://docs.google.com/document/d/1pHTqQ3nWT348RyTLcCdUH9gHjLU7erKfqqa2oXiz_qY/edit

We have some existing models and APIs for programs, courses, course runs, etc. We need to figure out whether we use these going forward for other functionality like ecommerce or whether it's better to have separate data models (and effectively treat search like it's a separate service even though it's cohosted) and use the product/ecommerce/enrollment and just another source of truth that's ingested into the search data.

collinpreston commented 1 year ago

Considering the tiny amount of overlap between the two data models, I think it would be best to have an e-commerce model structure that exists separately from the current course-catalog model structure. Additionally, having a separate data model for e-commerce would allow us to build e-commerce functionality into it's own service, or migrate to a different e-commerce solution if we wanted to do so in the future.

So to help understand what models would generally be required to support our e-commerce requirements, I sketched out an ER diagram: open-ecom-e-commerce (proposed) drawio

I also generated a similar ER diagram for the current course-catalog application in Open: course_catalog

The course-catalog model structure is much more elaborate than the proposed e-commerce structure. The only piece of data shared between both model structures is "price" which is used during filtering and the front-end when displaying courses and programs.

You can view both model structure ER diagrams here