60 lines
2.5 KiB
C#
60 lines
2.5 KiB
C#
using FruitBank.Common.Enums;
|
|
|
|
namespace Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Models;
|
|
|
|
public class OrderDraftListModel
|
|
{
|
|
public string StatusFilter { get; set; } = "Pending";
|
|
}
|
|
|
|
public class OrderDraftListRow
|
|
{
|
|
public int Id { get; set; }
|
|
public string ExternalUsername { get; set; } = string.Empty;
|
|
public string CustomerName { get; set; } = string.Empty;
|
|
public int? CustomerId { get; set; }
|
|
public string RawMessageTextShort { get; set; } = string.Empty;
|
|
public string ParsedDeliveryDate { get; set; } = string.Empty;
|
|
public int ItemCount { get; set; }
|
|
public string Status { get; set; } = string.Empty;
|
|
public string StatusBadgeClass { get; set; } = string.Empty;
|
|
public bool IsUrgent { get; set; } // Pending és > 20 óra régi
|
|
public string CreatedOnUtc { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class OrderDraftDetailModel
|
|
{
|
|
public int Id { get; set; }
|
|
public string ExternalUsername { get; set; } = string.Empty;
|
|
public int? CustomerId { get; set; }
|
|
public string CustomerName { get; set; } = string.Empty;
|
|
public string RawMessageText { get; set; } = string.Empty;
|
|
public DateTime ParsedDeliveryDate { get; set; }
|
|
public bool IsPreorder { get; set; }
|
|
public string Status { get; set; } = string.Empty;
|
|
public string AdminNote { get; set; } = string.Empty;
|
|
public string CreatedOnUtc { get; set; } = string.Empty;
|
|
public bool CanApprove { get; set; }
|
|
public List<OrderDraftItemModel> Items { get; set; } = [];
|
|
}
|
|
|
|
public class OrderDraftItemModel
|
|
{
|
|
public int Id { get; set; }
|
|
public string RawProductText { get; set; } = string.Empty;
|
|
public string AiResolvedProductName{ get; set; } = string.Empty;
|
|
public int RequestedQuantity { get; set; }
|
|
public bool IsPreorder { get; set; }
|
|
public int SortOrder { get; set; }
|
|
public int? SelectedProductId { get; set; }
|
|
public string SelectedProductName { get; set; } = string.Empty;
|
|
public List<OrderDraftProductCandidate> Candidates { get; set; } = [];
|
|
}
|
|
|
|
public class OrderDraftProductCandidate
|
|
{
|
|
public int Id { get; set; }
|
|
public string Name { get; set; } = string.Empty;
|
|
public string Stock { get; set; } = string.Empty;
|
|
}
|