From 1c14a20d77d60081418f621295fab1d5ffdbb473 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Fri, 22 Mar 2024 16:42:08 +0800 Subject: [PATCH] Add Id to Comment to specify whether it belongs to Question or Answer --- MyApp.ServiceModel/Meta.cs | 2 ++ MyApp.ServiceModel/Posts.cs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/MyApp.ServiceModel/Meta.cs b/MyApp.ServiceModel/Meta.cs index 8f327a6..bf63bc2 100644 --- a/MyApp.ServiceModel/Meta.cs +++ b/MyApp.ServiceModel/Meta.cs @@ -2,6 +2,8 @@ public class Meta { + // Question + Answer Stats Totals public List StatTotals { get; set; } public Dictionary ModelVotes { get; set; } + public List Comments { get; set; } = []; } diff --git a/MyApp.ServiceModel/Posts.cs b/MyApp.ServiceModel/Posts.cs index 8aef010..b43fbca 100644 --- a/MyApp.ServiceModel/Posts.cs +++ b/MyApp.ServiceModel/Posts.cs @@ -122,6 +122,10 @@ public class Answer public class Comment { + /// + /// `Post.Id` or `${Post.Id}-{UserName}` (Answer) + /// + public string Id { get; set; } public string Body { get; set; } public string CreatedBy { get; set; } public DateTime CreatedDate { get; set; }