2013-08-12 16:45:00 +10:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2013-06-05 14:37:19 -10:00
|
|
|
|
using System.Runtime.Serialization;
|
2013-05-23 22:15:52 -10:00
|
|
|
|
using Newtonsoft.Json;
|
2013-06-05 14:37:19 -10:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2013-06-10 20:24:54 -02:00
|
|
|
|
using Umbraco.Core.Models;
|
2013-05-23 22:15:52 -10:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.Models.ContentEditing
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A model representing a content item to be saved
|
|
|
|
|
|
/// </summary>
|
2013-07-16 18:23:20 +10:00
|
|
|
|
[DataContract(Name = "content", Namespace = "")]
|
2013-06-10 20:24:54 -02:00
|
|
|
|
public class ContentItemSave<TPersisted> : ContentItemBasic<ContentPropertyBasic, TPersisted>, IHaveUploadedFiles
|
|
|
|
|
|
where TPersisted : IContentBase
|
2013-05-23 22:15:52 -10:00
|
|
|
|
{
|
|
|
|
|
|
public ContentItemSave()
|
|
|
|
|
|
{
|
|
|
|
|
|
UploadedFiles = new List<ContentItemFile>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-06-05 14:37:19 -10:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The action to perform when saving this content item
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "action", IsRequired = true)]
|
|
|
|
|
|
[Required]
|
|
|
|
|
|
public ContentSaveAction Action { get; set; }
|
|
|
|
|
|
|
2013-08-12 16:45:00 +10:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The template alias to save
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "templateAlias")]
|
|
|
|
|
|
public string TemplateAlias { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[DataMember(Name = "releaseDate")]
|
|
|
|
|
|
public DateTime? ReleaseDate { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[DataMember(Name = "expireDate")]
|
|
|
|
|
|
public DateTime? ExpireDate { get; set; }
|
|
|
|
|
|
|
2013-05-23 22:15:52 -10:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The collection of files uploaded
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public List<ContentItemFile> UploadedFiles { get; private set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|