namespace MoneyMap.Models { /// /// Represents a mapping rule that associates transaction name patterns with categories. /// Used for automatic categorization of transactions during import. /// public class CategoryMapping { public int Id { get; set; } /// /// The category to assign when a transaction matches the pattern. /// public required string Category { get; set; } /// /// The pattern to match against transaction names (case-insensitive contains). /// public required string Pattern { get; set; } /// /// Higher priority mappings are checked first. Default is 0. /// public int Priority { get; set; } = 0; /// /// Optional merchant to auto-assign when this pattern matches. /// public int? MerchantId { get; set; } public Merchant? Merchant { get; set; } /// /// AI confidence score when this rule was created by AI (0.0 - 1.0). /// public decimal? Confidence { get; set; } /// /// Who created this rule: "User" or "AI". /// public string? CreatedBy { get; set; } /// /// When this rule was created. /// public DateTime? CreatedAt { get; set; } } }