namespace RMuseum.Models.Ganjoor.ViewModels { /// /// a single user's rating value for a single comment /// (used to merge "my rating" state into an already fetched, anonymously cacheable comment list) /// public class GanjoorCommentUserRatingViewModel { /// /// GanjoorComment Id /// public int CommentId { get; set; } /// /// +1 = Like, -1 = Dislike /// public short Value { get; set; } } /// /// result of rating/unrating a comment, returned so the client can update counts in place /// without re-fetching the whole comment list /// public class GanjoorCommentRatingResultViewModel { /// /// comment id /// public int CommentId { get; set; } /// /// updated total likes /// public int LikeCount { get; set; } /// /// updated total dislikes /// public int DislikeCount { get; set; } /// /// the rating value the requesting user now has for this comment (0 if cleared) /// public short CurrentUserRatingValue { get; set; } } }