47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using Nop.Web.Framework.Models;
|
|
using Nop.Web.Framework.Mvc.ModelBinding;
|
|
|
|
namespace Nop.Web.Areas.Admin.Models.Directory;
|
|
|
|
/// <summary>
|
|
/// Represents a state and province model
|
|
/// </summary>
|
|
public partial record StateProvinceModel : BaseNopEntityModel, ILocalizedModel<StateProvinceLocalizedModel>
|
|
{
|
|
#region Ctor
|
|
|
|
public StateProvinceModel()
|
|
{
|
|
Locales = new List<StateProvinceLocalizedModel>();
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
public int CountryId { get; set; }
|
|
|
|
[NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.Name")]
|
|
public string Name { get; set; }
|
|
|
|
[NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.Abbreviation")]
|
|
public string Abbreviation { get; set; }
|
|
|
|
[NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.Published")]
|
|
public bool Published { get; set; }
|
|
|
|
[NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.DisplayOrder")]
|
|
public int DisplayOrder { get; set; }
|
|
|
|
public IList<StateProvinceLocalizedModel> Locales { get; set; }
|
|
|
|
#endregion
|
|
}
|
|
|
|
public partial record StateProvinceLocalizedModel : ILocalizedLocaleModel
|
|
{
|
|
public int LanguageId { get; set; }
|
|
|
|
[NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.Name")]
|
|
public string Name { get; set; }
|
|
} |