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

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

/// <summary>
/// Represents a shipping method model
/// </summary>
public partial record ShippingMethodModel : BaseNopEntityModel, ILocalizedModel<ShippingMethodLocalizedModel>
{
    #region Ctor

    public ShippingMethodModel()
    {
        Locales = new List<ShippingMethodLocalizedModel>();
    }

    #endregion

    #region Properties

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

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

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

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

    #endregion
}

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

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

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