Add JsonProperty to Sync Request/Response model

This commit is contained in:
ChronosX88 2021-03-25 14:29:30 +03:00
parent a565a0e330
commit 2e72d8377e
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A
2 changed files with 14 additions and 0 deletions

View File

@ -1,12 +1,20 @@
using Newtonsoft.Json;
using Zirconium.Core.Models; using Zirconium.Core.Models;
namespace ChatSubsystem.Storage.Models namespace ChatSubsystem.Storage.Models
{ {
public class SyncRequest public class SyncRequest
{ {
[JsonProperty("since")]
public EntityID Since { get; set; } public EntityID Since { get; set; }
[JsonProperty("limit")]
public int Limit { get; set; } public int Limit { get; set; }
[JsonProperty("chatID")]
public EntityID ChatID { get; set; } public EntityID ChatID { get; set; }
[JsonProperty("syncDirection")]
public string SyncDirection { get; set; } public string SyncDirection { get; set; }
} }
} }

View File

@ -1,12 +1,18 @@
using System.Collections.Generic; using System.Collections.Generic;
using Newtonsoft.Json;
using Zirconium.Core.Models; using Zirconium.Core.Models;
namespace ChatSubsystem.Storage.Models namespace ChatSubsystem.Storage.Models
{ {
public class SyncResponse public class SyncResponse
{ {
[JsonProperty("nextBatch")]
public EntityID NextBatch { get; set; } public EntityID NextBatch { get; set; }
[JsonProperty("mentionedChats")]
public IList<Chat> MentionedChats { get; set; } public IList<Chat> MentionedChats { get; set; }
[JsonProperty("events")]
public IList<Event> Events { get; set; } public IList<Event> Events { get; set; }
} }
} }