Webiant Logo Webiant Logo
  1. No results found.

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

MessageTemplateModel.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.Messages;

/// 
/// Represents a message template model
/// 
public partial record MessageTemplateModel : BaseNopEntityModel, ILocalizedModel, IStoreMappingSupportedModel
{
    #region Ctor

    public MessageTemplateModel()
    {
        Locales = new List();
        AvailableEmailAccounts = new List();

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

    #endregion

    #region Properties

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

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

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

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

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

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

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

    [NopResourceDisplayName("Admin.ContentManagement.MessageTemplates.Fields.DelayBeforeSend")]
    [UIHint("Int32Nullable")]
    public int? DelayBeforeSend { get; set; }

    public int DelayPeriodId { get; set; }

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

    public bool HasAttachedDownload { get; set; }
    [NopResourceDisplayName("Admin.ContentManagement.MessageTemplates.Fields.AttachedDownload")]
    [UIHint("Download")]
    public int AttachedDownloadId { get; set; }

    [NopResourceDisplayName("Admin.ContentManagement.MessageTemplates.Fields.EmailAccount")]
    public int EmailAccountId { get; set; }

    public IList AvailableEmailAccounts { get; set; }

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

    public IList AvailableStores { get; set; }

    //comma-separated list of stores used on the list page
    [NopResourceDisplayName("Admin.ContentManagement.MessageTemplates.Fields.LimitedToStores")]
    public string ListOfStores { get; set; }

    public IList Locales { get; set; }

    #endregion
}

public partial record MessageTemplateLocalizedModel : ILocalizedLocaleModel
{
    public MessageTemplateLocalizedModel()
    {
        AvailableEmailAccounts = new List();
    }

    public int LanguageId { get; set; }

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

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

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

    [NopResourceDisplayName("Admin.ContentManagement.MessageTemplates.Fields.EmailAccount")]
    public int EmailAccountId { get; set; }
    public IList AvailableEmailAccounts { get; set; }
}