refactor: extract Models and Data into MoneyMap.Core shared library
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
namespace MoneyMap.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a mapping rule that associates transaction name patterns with categories.
|
||||
/// Used for automatic categorization of transactions during import.
|
||||
/// </summary>
|
||||
public class CategoryMapping
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The category to assign when a transaction matches the pattern.
|
||||
/// </summary>
|
||||
public required string Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The pattern to match against transaction names (case-insensitive contains).
|
||||
/// </summary>
|
||||
public required string Pattern { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Higher priority mappings are checked first. Default is 0.
|
||||
/// </summary>
|
||||
public int Priority { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Optional merchant to auto-assign when this pattern matches.
|
||||
/// </summary>
|
||||
public int? MerchantId { get; set; }
|
||||
public Merchant? Merchant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// AI confidence score when this rule was created by AI (0.0 - 1.0).
|
||||
/// </summary>
|
||||
public decimal? Confidence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Who created this rule: "User" or "AI".
|
||||
/// </summary>
|
||||
public string? CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When this rule was created.
|
||||
/// </summary>
|
||||
public DateTime? CreatedAt { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user