joanie icon indicating copy to clipboard operation
joanie copied to clipboard

♻️(backend) move logic functions away from models

Open kernicPanel opened this issue 1 year ago • 0 comments

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe. We have several functions in our models that manages some logic. We want to move them outside of models. ie: https://github.com/openfun/joanie/blob/main/src/backend/joanie/core/models/products.py#L915

Describe the solution you'd like Add a "service" module with those functions, and inject into them the original model instance.

Describe alternatives you've considered Maybe use an existing module in which those functions will fit well ?

Do you want to work on it through a Pull Request? :+1:

kernicPanel avatar Dec 07 '23 11:12 kernicPanel