30 lines
1.4 KiB
C#
30 lines
1.4 KiB
C#
using System.Windows.Media;
|
|
|
|
namespace UtopiaCanteenSystem.Models;
|
|
|
|
/// <summary>
|
|
/// One row in the Order History list (last 5 orders).
|
|
/// </summary>
|
|
public class OrderHistoryItem
|
|
{
|
|
/// <summary>HRMS employee document id (employee.id) for this order; used to load photo.</summary>
|
|
public string ParentDocumentId { get; set; } = string.Empty;
|
|
public string EmployeeId { get; set; } = string.Empty;
|
|
public string EmployeeName { get; set; } = string.Empty;
|
|
public string Department { get; set; } = string.Empty;
|
|
public string ScanId { get; set; } = string.Empty;
|
|
public DateTime OrderTimeUtc { get; set; }
|
|
/// <summary>The meal/menu label to display (e.g. Breakfast or "Biryani + Nihari").</summary>
|
|
public string OrderItem { get; set; } = string.Empty;
|
|
/// <summary>Total price for this row, based on the active meal's menu items.</summary>
|
|
public double TotalPrice { get; set; }
|
|
/// <summary>Display label: "Today", "Yesterday", or short date.</summary>
|
|
public string RelativeDateLabel { get; set; } = string.Empty;
|
|
/// <summary>Time only, e.g. "09:54 AM".</summary>
|
|
public string TimeDisplay { get; set; } = string.Empty;
|
|
/// <summary>Optional employee photo for this row; null = show placeholder.</summary>
|
|
public ImageSource? EmployeePhoto { get; set; }
|
|
/// <summary>True when EmployeePhoto is not null.</summary>
|
|
public bool HasEmployeePhoto => EmployeePhoto != null;
|
|
}
|