Webiant Logo Webiant Logo
  1. No results found.

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

VendorModel.cs

using System.ComponentModel.DataAnnotations;
using Nop.Core.Domain.Catalog;
using Nop.Web.Areas.Admin.Models.Common;
using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;

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

/// 
/// Represents a vendor model
/// 
public partial record VendorModel : BaseNopEntityModel, ILocalizedModel
{
    #region Ctor

    public VendorModel()
    {
        if (PageSize < 1)
            PageSize = 5;

        Address = new AddressModel();
        VendorAttributes = new List();
        Locales = new List();
        AssociatedCustomers = new List();
        VendorNoteSearchModel = new VendorNoteSearchModel();
    }

    #endregion

    #region Properties

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

    [DataType(DataType.EmailAddress)]
    [NopResourceDisplayName("Admin.Vendors.Fields.Email")]
    public string Email { get; set; }

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

    [UIHint("Picture")]
    [NopResourceDisplayName("Admin.Vendors.Fields.Picture")]
    public int PictureId { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.AdminComment")]
    public string AdminComment { get; set; }

    public AddressModel Address { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.Active")]
    public bool Active { get; set; }

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

    [NopResourceDisplayName("Admin.Vendors.Fields.MetaKeywords")]
    public string MetaKeywords { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.MetaDescription")]
    public string MetaDescription { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.MetaTitle")]
    public string MetaTitle { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.SeName")]
    public string SeName { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.PageSize")]
    public int PageSize { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.AllowCustomersToSelectPageSize")]
    public bool AllowCustomersToSelectPageSize { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.PageSizeOptions")]
    public string PageSizeOptions { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.PriceRangeFiltering")]
    public bool PriceRangeFiltering { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.PriceFrom")]
    public decimal PriceFrom { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.PriceTo")]
    public decimal PriceTo { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.ManuallyPriceRange")]
    public bool ManuallyPriceRange { get; set; }

    public List VendorAttributes { get; set; }

    public IList Locales { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.AssociatedCustomerEmails")]
    public IList AssociatedCustomers { get; set; }

    //vendor notes
    [NopResourceDisplayName("Admin.Vendors.VendorNotes.Fields.Note")]
    public string AddVendorNoteMessage { get; set; }

    public VendorNoteSearchModel VendorNoteSearchModel { get; set; }

    public string PrimaryStoreCurrencyCode { get; set; }

    #endregion

    #region Nested classes

    public partial record VendorAttributeModel : BaseNopEntityModel
    {
        public VendorAttributeModel()
        {
            Values = new List();
        }

        public string Name { get; set; }

        public bool IsRequired { get; set; }

        /// 
        /// Default value for textboxes
        /// 
        public string DefaultValue { get; set; }

        public AttributeControlType AttributeControlType { get; set; }

        public IList Values { get; set; }
    }

    public partial record VendorAttributeValueModel : BaseNopEntityModel
    {
        public string Name { get; set; }

        public bool IsPreSelected { get; set; }
    }

    #endregion
}

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

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

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

    [NopResourceDisplayName("Admin.Vendors.Fields.MetaKeywords")]
    public string MetaKeywords { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.MetaDescription")]
    public string MetaDescription { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.MetaTitle")]
    public string MetaTitle { get; set; }

    [NopResourceDisplayName("Admin.Vendors.Fields.SeName")]
    public string SeName { get; set; }
}