From 9faba4af42ededb73859452342451cf8d3ae27a0 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 11 Feb 2026 17:22:00 +0000 Subject: [PATCH] set up postgres class --- backend/categorisation/categorisation_postgres.py | 5 +++++ backend/categorisation/processor.py | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 backend/categorisation/categorisation_postgres.py diff --git a/backend/categorisation/categorisation_postgres.py b/backend/categorisation/categorisation_postgres.py new file mode 100644 index 00000000..f2a44e5b --- /dev/null +++ b/backend/categorisation/categorisation_postgres.py @@ -0,0 +1,5 @@ +from backend.app.db.connection import db_session + + +class CategorisationPostgres: + pass diff --git a/backend/categorisation/processor.py b/backend/categorisation/processor.py index aa519c6e..f6e4f7dc 100644 --- a/backend/categorisation/processor.py +++ b/backend/categorisation/processor.py @@ -1,2 +1,10 @@ -def process_portfolio() -> None: +def process_portfolio(portfolio_id: int) -> None: + # Get all plans (including scenarios) for all properties in the portfolio + + # For each property, get all compliant plans + + # For each property, find the cheapest compliant plan + + # For each property, set is_default for cheapest compliant plan + # If no compliant plans, set it to the cheapest plan pass