todo comment (some more)
This commit is contained in:
@@ -77,8 +77,12 @@ class Category(ExportBaseModel):
|
|||||||
return f'Category.from_str("{self.__str__()}")'
|
return f'Category.from_str("{self.__str__()}")'
|
||||||
|
|
||||||
def get_budget(self, date_valid: date | None) -> float:
|
def get_budget(self, date_valid: date | None) -> float:
|
||||||
|
# TODO
|
||||||
...
|
...
|
||||||
|
|
||||||
|
def get_tree_to_root(self) -> CategoryTree:
|
||||||
|
# TODO (maybe)
|
||||||
|
...
|
||||||
|
|
||||||
class CategoryDb(BaseModelDb):
|
class CategoryDb(BaseModelDb):
|
||||||
__tablename__ = "category"
|
__tablename__ = "category"
|
||||||
@@ -256,6 +260,9 @@ class CategoryTree(BaseModel):
|
|||||||
result += sum(category.category.get_budget(date_valid) for category in self.sub_categories)
|
result += sum(category.category.get_budget(date_valid) for category in self.sub_categories)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def __add__(self, other):
|
||||||
|
...
|
||||||
|
|
||||||
def build_category_tree(transactions: list[Transaction]) -> list[CategoryTree]:
|
def build_category_tree(transactions: list[Transaction]) -> list[CategoryTree]:
|
||||||
# TODO: loop through flat list a build a category tree
|
# TODO: loop through flat list a build a category tree
|
||||||
result = []
|
result = []
|
||||||
|
|||||||
Reference in New Issue
Block a user