Webiant Logo Webiant Logo
  1. No results found.

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

PluginModel.cs

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

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

/// 
/// Represents a plugin model
/// 
public partial record PluginModel : BaseNopModel, IAclSupportedModel, ILocalizedModel, IPluginModel, IStoreMappingSupportedModel
{
    #region Ctor

    public PluginModel()
    {
        Locales = new List();

        SelectedStoreIds = new List();
        AvailableStores = new List();
        SelectedCustomerRoleIds = new List();
        AvailableCustomerRoles = new List();
    }

    #endregion

    #region Properties

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

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

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

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

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

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

    [NopResourceDisplayName("Admin.Configuration.Plugins.Fields.Configure")]
    public string ConfigurationUrl { get; set; }

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

    public string Description { get; set; }

    public bool CanChangeEnabled { get; set; }

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

    [NopResourceDisplayName("Admin.Configuration.Plugins.Fields.Logo")]
    public string LogoUrl { get; set; }

    public IList Locales { get; set; }

    //ACL (customer roles)
    [NopResourceDisplayName("Admin.Configuration.Plugins.Fields.AclCustomerRoles")]
    public IList SelectedCustomerRoleIds { get; set; }

    public IList AvailableCustomerRoles { get; set; }

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

    public IList AvailableStores { get; set; }

    public bool IsActive { get; set; }

    #endregion
}

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

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