Skip to content

Commit 371b5eb

Browse files
committed
feat: ✨ adds Node and TextNode models
1 parent e366720 commit 371b5eb

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Collections.Generic;
2+
using Contentstack.Management.Core.Utils;
3+
using Newtonsoft.Json;
4+
5+
namespace Contentstack.Management.Core.Models
6+
{
7+
[JsonConverter(typeof(NodeJsonConverter))]
8+
public class Node
9+
{
10+
public string type { get; set; }
11+
12+
public IDictionary<string, object> attrs { get; set; }
13+
14+
public List<Node> children { get; set; }
15+
}
16+
}

Contentstack.Management.Core/Models/ReleaseModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class ReleaseItemModel
4343
public string Uid { get; set; }
4444

4545
[JsonProperty(propertyName: "version")]
46-
public string Version { get; set; }
46+
public int Version { get; set; }
4747

4848
[JsonProperty(propertyName: "locale")]
4949
public string Locale { get; set; }
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using Newtonsoft.Json;
3+
using Contentstack.Management.Core.Utils;
4+
5+
namespace Contentstack.Management.Core.Models
6+
{
7+
[JsonConverter(typeof(TextNodeJsonConverter))]
8+
public class TextNode: Node
9+
{
10+
public bool bold { get; set; }
11+
public bool italic { get; set; }
12+
public bool underline { get; set; }
13+
public bool strikethrough { get; set; }
14+
public bool inlineCode { get; set; }
15+
public bool subscript { get; set; }
16+
public bool superscript { get; set; }
17+
public string text { get; set; }
18+
}
19+
}

0 commit comments

Comments
 (0)