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; } /// /// Unit of Measure (ea, lb, gal, etc.) /// [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; } }