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:
Shannon
2018-07-19 19:32:07 +10:00
parent 888f8cfc56
commit 18cd9ea1e8
49 changed files with 1157 additions and 919 deletions

View 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; }
}
}