Implement classification redesign
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"finance-duck/internal/banking"
|
||||
"finance-duck/internal/classification"
|
||||
"finance-duck/internal/domain"
|
||||
)
|
||||
|
||||
@@ -108,6 +109,12 @@ func SaveCategory(d *domain.Dataset, v domain.Category) error {
|
||||
d.Categories = append(d.Categories, v)
|
||||
return nil
|
||||
}
|
||||
|
||||
// LearnAlias records the chosen counterparty as a merchant alias when the
|
||||
// classification matcher remains unambiguous.
|
||||
func LearnAlias(d *domain.Dataset, f domain.Facts, merchantID string) bool {
|
||||
return classification.LearnAlias(d, f, merchantID)
|
||||
}
|
||||
func SaveTag(d *domain.Dataset, v domain.Tag) error {
|
||||
v.Name = strings.TrimSpace(v.Name)
|
||||
if v.ID == "" {
|
||||
|
||||
Reference in New Issue
Block a user