3deca29f05
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
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; }
|
|
} |