WIP refactor commit for getting all variants at once saving, this requires pulling apart a lot of the models and corresponding binders and validators.
This commit is contained in:
37
src/Umbraco.Web/Models/ContentEditing/ContentVariantSave.cs
Normal file
37
src/Umbraco.Web/Models/ContentEditing/ContentVariantSave.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Validation;
|
||||
|
||||
namespace Umbraco.Web.Models.ContentEditing
|
||||
{
|
||||
[DataContract(Name = "contentVariant", Namespace = "")]
|
||||
public class ContentVariantSave : IContentProperties<ContentPropertyBasic>
|
||||
{
|
||||
public ContentVariantSave()
|
||||
{
|
||||
Properties = new List<ContentPropertyBasic>();
|
||||
}
|
||||
|
||||
[DataMember(Name = "name", IsRequired = true)]
|
||||
[RequiredForPersistence(AllowEmptyStrings = false, ErrorMessage = "Required")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[DataMember(Name = "properties")]
|
||||
public IEnumerable<ContentPropertyBasic> Properties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The culture of this variant, if this is invariant than this is null or empty
|
||||
/// </summary>
|
||||
[DataMember(Name = "culture")]
|
||||
public string Culture { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the variant should be published or unpublished
|
||||
/// </summary>
|
||||
[DataMember(Name = "publish")]
|
||||
public bool Publish { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user