// ========================================================================== // 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.CreateContent { [RuleAction( Title = "CreateContent", IconImage = "", IconColor = "#3389ff", Display = "Create content", Description = "Create a a new content item for any schema.")] public sealed record CreateContentAction : RuleAction { [LocalizedRequired] [Display(Name = "Data", Description = "The content data.")] [DataType(DataType.MultilineText)] [Formattable] public string Data { get; set; } [LocalizedRequired] [Display(Name = "Schema", Description = "The name of the schema.")] [DataType(DataType.Text)] public string Schema { get; set; } [Display(Name = "Client", Description = "An optional client name.")] [DataType(DataType.Text)] public string Client { get; set; } [Display(Name = "Publish", Description = "Publish the content.")] [DataType(DataType.Text)] public bool Publish { get; set; } } }