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:
2026-04-20 18:16:33 -04:00
parent d831991ad0
commit 3deca29f05
23 changed files with 59 additions and 7 deletions
+44
View File
@@ -0,0 +1,44 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace MoneyMap.Models;
[Index(nameof(ReceiptId), nameof(LineNumber))]
public class ReceiptLineItem
{
[Key]
public long Id { get; set; }
public long ReceiptId { get; set; }
public Receipt Receipt { get; set; } = null!;
public int LineNumber { get; set; }
[MaxLength(300)]
public string Description { get; set; } = string.Empty;
// ReceiptLineItem
[Column(TypeName = "decimal(18,4)")]
public decimal? Quantity { get; set; }
/// <summary>
/// Unit of Measure (ea, lb, gal, etc.)
/// </summary>
[MaxLength(16)]
public string? Unit { get; set; }
[Column(TypeName = "decimal(18,4)")]
public decimal? UnitPrice { get; set; }
[Column(TypeName = "decimal(18,2)")]
public decimal? LineTotal { get; set; }
[MaxLength(64)]
public string? Sku { get; set; }
[MaxLength(100)]
public string? Category { get; set; }
public bool Voided { get; set; }
}