// ========================================================================== // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex UG (haftungsbeschraenkt) // All rights reserved. Licensed under the MIT license. // ========================================================================== using System.ComponentModel.DataAnnotations; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules; using Squidex.Infrastructure.Validation; namespace Squidex.Extensions.Actions.Notification { [RuleAction( Title = "Notification", IconImage = "", IconColor = "#3389ff", Display = "Send a notification", Description = "Send an integrated notification to a user.")] public sealed record NotificationAction : RuleAction { [LocalizedRequired] [Display(Name = "User", Description = "The user id or email.")] [Editor(RuleFieldEditor.Text)] public string User { get; set; } [LocalizedRequired] [Display(Name = "Title", Description = "The text to send.")] [Editor(RuleFieldEditor.TextArea)] [Formattable] public string Text { get; set; } [Display(Name = "Url", Description = "The optional url to attach to the notification.")] [Editor(RuleFieldEditor.Text)] [Formattable] public string Url { get; set; } [Display(Name = "Client", Description = "An optional client name.")] [Editor(RuleFieldEditor.Text)] public string Client { get; set; } } }