feat: #46 auto-categorização no import por histórico de descrições
- TransactionRepository.CategoryByDescription: busca a categoria mais recente para cada descrição normalizada no histórico do perfil - ImportService.Preview: pré-preenche category_id em linhas não-duplicatas cuja descrição já foi categorizada antes (case-insensitive) - Duplicatas não recebem sugestão - 2 novos testes: auto-categorize + duplicate-not-categorized Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
@@ -22,6 +22,9 @@ func (m *mockImportTxRepo) BulkInsert(_ context.Context, rows []model.ImportRow)
|
||||
func (m *mockImportTxRepo) SaveImportLog(_ context.Context, _, _ string, _, _, _ int) error {
|
||||
return nil
|
||||
}
|
||||
func (m *mockImportTxRepo) CategoryByDescription(_ context.Context, _ []string) (map[string]int, error) {
|
||||
return map[string]int{}, nil
|
||||
}
|
||||
|
||||
type mockDashboardRepo struct {
|
||||
income float64
|
||||
|
||||
Reference in New Issue
Block a user