Webiant Logo Webiant Logo
  1. No results found.

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

PollModel.cs

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

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

/// 
/// Represents a poll model
/// 
public partial record PollModel : BaseNopEntityModel, IStoreMappingSupportedModel
{
    #region Ctor

    public PollModel()
    {
        AvailableLanguages = new List();
        AvailableStores = new List();
        SelectedStoreIds = new List();
        PollAnswerSearchModel = new PollAnswerSearchModel();
    }

    #endregion

    #region Properties

    [NopResourceDisplayName("Admin.ContentManagement.Polls.Fields.Language")]
    public int LanguageId { get; set; }

    public IList AvailableLanguages { get; set; }

    [NopResourceDisplayName("Admin.ContentManagement.Polls.Fields.Language")]
    public string LanguageName { get; set; }

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

    [NopResourceDisplayName("Admin.ContentManagement.Polls.Fields.SystemKeyword")]
    public string SystemKeyword { get; set; }

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

    [NopResourceDisplayName("Admin.ContentManagement.Polls.Fields.ShowOnHomepage")]
    public bool ShowOnHomepage { get; set; }

    [NopResourceDisplayName("Admin.ContentManagement.Polls.Fields.AllowGuestsToVote")]
    public bool AllowGuestsToVote { get; set; }

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

    [NopResourceDisplayName("Admin.ContentManagement.Polls.Fields.StartDate")]
    [UIHint("DateTimeNullable")]
    public DateTime? StartDateUtc { get; set; }

    [NopResourceDisplayName("Admin.ContentManagement.Polls.Fields.EndDate")]
    [UIHint("DateTimeNullable")]
    public DateTime? EndDateUtc { get; set; }

    [NopResourceDisplayName("Admin.ContentManagement.Polls.Fields.LimitedToStores")]
    public IList SelectedStoreIds { get; set; }

    public IList AvailableStores { get; set; }

    public PollAnswerSearchModel PollAnswerSearchModel { get; set; }

    #endregion
}