using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;

namespace Nop.Web.Areas.Admin.Models.Shipping;

/// <summary>
/// Represents a product availability range model
/// </summary>
public partial record ProductAvailabilityRangeModel : BaseNopEntityModel, ILocalizedModel<ProductAvailabilityRangeLocalizedModel>
{
    #region Ctor

    public ProductAvailabilityRangeModel()
    {
        Locales = new List<ProductAvailabilityRangeLocalizedModel>();
    }

    #endregion

    #region Properties

    [NopResourceDisplayName("Admin.Configuration.Shipping.ProductAvailabilityRanges.Fields.Name")]
    public string Name { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Shipping.ProductAvailabilityRanges.Fields.DisplayOrder")]
    public int DisplayOrder { get; set; }

    public IList<ProductAvailabilityRangeLocalizedModel> Locales { get; set; }

    #endregion
}

public partial record ProductAvailabilityRangeLocalizedModel : ILocalizedLocaleModel
{
    public int LanguageId { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Shipping.ProductAvailabilityRanges.Fields.Name")]
    public string Name { get; set; }
}