Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

CountryModel.cs

using Microsoft.AspNetCore.Mvc.Rendering;
using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;

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

/// 
/// Represents a country model
/// 
public partial record CountryModel : BaseNopEntityModel, ILocalizedModel, IStoreMappingSupportedModel
{
    #region Ctor

    public CountryModel()
    {
        Locales = new List();
        SelectedStoreIds = new List();
        AvailableStores = new List();
        StateProvinceSearchModel = new StateProvinceSearchModel();
    }

    #endregion

    #region Properties

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

    [NopResourceDisplayName("Admin.Configuration.Countries.Fields.AllowsBilling")]
    public bool AllowsBilling { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Countries.Fields.AllowsShipping")]
    public bool AllowsShipping { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Countries.Fields.TwoLetterIsoCode")]
    public string TwoLetterIsoCode { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Countries.Fields.ThreeLetterIsoCode")]
    public string ThreeLetterIsoCode { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Countries.Fields.NumericIsoCode")]
    public int NumericIsoCode { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Countries.Fields.SubjectToVat")]
    public bool SubjectToVat { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Countries.Fields.Published")]
    public bool Published { get; set; }

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

    [NopResourceDisplayName("Admin.Configuration.Countries.Fields.NumberOfStates")]
    public int NumberOfStates { get; set; }

    public IList Locales { get; set; }

    //store mapping
    [NopResourceDisplayName("Admin.Configuration.Countries.Fields.LimitedToStores")]
    public IList SelectedStoreIds { get; set; }
    public IList AvailableStores { get; set; }

    public StateProvinceSearchModel StateProvinceSearchModel { get; set; }

    #endregion
}

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

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