feat(req-002): implement portfolio tagging and tag filters

This commit is contained in:
2026-04-14 01:06:10 +09:00
parent 2dab17cbb1
commit a776ea3b1d
20 changed files with 1033 additions and 32 deletions
+10 -1
View File
@@ -50,11 +50,20 @@ class FakeRepo:
setattr(portfolio, key, value)
return portfolio
def list_portfolios(self, *, broker=None, status=None, owner_user_id=None):
def list_portfolios(self, *, broker=None, status=None, owner_user_id=None, include_tags=None, exclude_tags=None, match_mode=None):
if owner_user_id is not None and self._portfolio and self._portfolio.owner_user_id != owner_user_id:
return []
return [self._portfolio] if self._portfolio else []
def add_tag(self, portfolio_id: str, *, tag: str):
raise NotImplementedError()
def list_tags(self, portfolio_id: str):
return []
def remove_tag(self, portfolio_id: str, *, tag: str) -> None:
raise NotImplementedError()
def get_or_create_strategy_set(self, name: str, config: str) -> StrategySet:
return self.strategy_set