Skip to content

Commit

Permalink
Add Id to Comment to specify whether it belongs to Question or Answer
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Mar 22, 2024
1 parent a511a2a commit 1c14a20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MyApp.ServiceModel/Meta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

public class Meta
{
// Question + Answer Stats Totals
public List<StatTotals> StatTotals { get; set; }
public Dictionary<string, int> ModelVotes { get; set; }
public List<Comment> Comments { get; set; } = [];
}
4 changes: 4 additions & 0 deletions MyApp.ServiceModel/Posts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ public class Answer

public class Comment
{
/// <summary>
/// `Post.Id` or `${Post.Id}-{UserName}` (Answer)
/// </summary>
public string Id { get; set; }
public string Body { get; set; }
public string CreatedBy { get; set; }
public DateTime CreatedDate { get; set; }
Expand Down

0 comments on commit 1c14a20

Please sign in to comment.