Files
Umbraco-CMS/src/Umbraco.Web/Models/ContentEditing/EntityBasic.cs

37 lines
1.1 KiB
C#
Raw Normal View History

2013-09-02 15:40:14 +02:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using Umbraco.Core.Models.Validation;
namespace Umbraco.Web.Models.ContentEditing
{
[DataContract(Name = "entity", Namespace = "")]
public class EntityBasic
{
[DataMember(Name = "name", IsRequired = true)]
[RequiredForPersistence(AllowEmptyStrings = false, ErrorMessage = "Required")]
public string Name { get; set; }
[DataMember(Name = "id", IsRequired = true)]
[Required]
public int Id { get; set; }
[DataMember(Name = "icon")]
public string Icon { get; set; }
[DataMember(Name = "parentId", IsRequired = true)]
[Required]
public int ParentId { get; set; }
/// <summary>
/// For now we'll exclude this from the json results, this is needed for permissions check filtering
/// </summary>
[IgnoreDataMember]
internal string Path { get; set; }
2013-09-02 15:40:14 +02:00
}
}