Mango.Nop.Plugins/Nop.Plugin.Misc.AIPlugin/Models/Orders/OrderAttributesModel.cs

41 lines
1.6 KiB
C#

using FruitBank.Common.Dtos;
using FruitBank.Common.Interfaces;
using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;
namespace Nop.Plugin.Misc.FruitBankPlugin.Models.Orders
{
public record OrderAttributesModel : BaseNopModel, IMeasurable
{
public int OrderId { get; set; }
[NopResourceDisplayName("Plugins.YourCompany.ProductAttributes.Fields.IsMeasurable")]
public bool IsMeasurable { get; set; }
[NopResourceDisplayName("Plugins.YourCompany.ProductAttributes.Fields.DateOfReceipt")]
public DateTime? DateOfReceipt { get; set; }
public OrderDto OrderDto { get; set; }
// ── Site (telephely) + license plate (rendszám) ────────────────────────
public int CustomerId { get; set; }
/// <summary>The order's current frozen site snapshot, if any.</summary>
public OrderSiteSnapshot? Site { get; set; }
public string? LicensePlate { get; set; }
/// <summary>The customer's current sites — choices for the order-site selector.</summary>
public List<OrderSiteOption> CustomerSites { get; set; } = new();
/// <summary>The customer's saved license plates — suggestions (datalist) for the order plate field.</summary>
public List<string> CustomerLicensePlateOptions { get; set; } = new();
}
public class OrderSiteOption
{
public int AddressId { get; set; }
public string Display { get; set; } = string.Empty;
public bool IsDefault { get; set; }
}
}