Advertisement
commodore73

Contentstack Entry Model Base Class

Jul 23rd, 2020
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.01 KB | None | 0 0
  1. //TODO: enable only needed properties.
  2.  
  3. namespace Root.Core.Models.Entries
  4. {
  5.     using System;
  6.  
  7.     using Newtonsoft.Json;
  8.  
  9.     using Deliverystack.Core.Models.Repositories;
  10.  
  11.     //        using Newtonsoft.Json.Linq;
  12.     //        using Contentstack.Core.Models;
  13.     //        using Root.Core.Models.GlobalFields;
  14.     public class ContentBlockEntry
  15.     {
  16.         public string Title { get; set; }
  17.         [JsonProperty(propertyName: "updated_at")]
  18.        
  19.         public DateTime UpdatedAt { get; set; }
  20.  
  21.         [JsonProperty(propertyName: "uid")]
  22.         public string EntryUid { get; set; }
  23.  
  24.         // set this explicitly from repository code, not by deserialization
  25.         public string ContentTypeUid { get; set; }
  26.  
  27.         public string Locale { get; set; }
  28.  
  29.         public string EditLink
  30.         {
  31.             get
  32.             {
  33.                 return Repository.GetEditLink(this.EntryUid, this.ContentTypeUid);
  34.             }
  35.         }
  36.  
  37.         public IRepository Repository { get; set; }
  38.     }
  39. }
  40.  
  41. //        public string[] Tags { get; set; }
  42.  
  43.  
  44. //        [JsonProperty(propertyName: "_version")]
  45. //        public Double Version { get; set; }
  46.  
  47. //        [JsonProperty(propertyName: "created_at")]
  48. //        public DateTime CreatedAt { get; set; }
  49.  
  50. //        [JsonProperty(propertyName: "created_by")]
  51. //        public string CreatedBy { get; set; }
  52.  
  53. //        [JsonProperty(propertyName: "updated_by")]
  54. //        public string UpdatedBy { get; set; }
  55.  
  56. //        public JObject JObject { get; set; }
  57.  
  58. //        public Entry Entry { get; set; }
  59.  
  60. //        [JsonProperty(propertyName: "publish_details")]
  61. //        public PublishDetails PublishDetails { get; set; }
  62.  
  63. //TODO: should a value other than MaxValue prevent Repository from including Entry?
  64. //        [JsonProperty(propertyName: "deleted_at")]
  65. //            public DateTime DeletedAt { get; set; } = DateTime.MaxValue;
  66.  
  67. //        [JsonProperty(propertyName: "deleted_by")]
  68. //        public string DeletedBy { get; set; };
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement