Adds state property to ContentItemBase (Not sure if this will blow things up or if I need to use a diff model for ListView children now)

Adds/copies the same logic from ContentSavedStateResolver.cs
This commit is contained in:
Warren Buckley
2018-09-12 12:08:51 +01:00
parent d39bb96056
commit 551e8120c9
2 changed files with 52 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Validation;
using Umbraco.Web.WebApi;
@@ -44,6 +45,10 @@ namespace Umbraco.Web.Models.ContentEditing
[DataMember(Name = "sortOrder")]
public int SortOrder { get; set; }
[DataMember(Name = "state")]
[JsonConverter(typeof(StringEnumConverter))]
public ContentSavedState State { get; set; }
protected bool Equals(ContentItemBasic other)
{
return Id == other.Id;