예제 #1
0
 private CommentModel MappingComment(BusinessBulletinBoard comment, string url, SystemUser systemUser)
 {
     return(new CommentModel
     {
         CreatedOn = comment.CreatedOn.ToUnixTime(),
         SystemUserId = comment.SystemUserId,
         Content = comment.Message,
         ProfilePhotoUrl = systemUser.ToPhotoUrl(url),
         FullName = systemUser?.FullName,
         Id = comment.BusinessPostId,
         Email = systemUser?.EmailAddress
     });
 }
예제 #2
0
 private BulletinModel Mapping(BusinessBulletinBoard a)
 {
     return(new BulletinModel
     {
         Id = a.BusinessPostId,
         SystemUserId = a.SystemUserId ?? 0,
         LikeCount = a.Likes ?? 0,
         DislikeCount = a.Dislikes ?? 0,
         CreatedOn = a.CreatedOn.ToUnixTime(),
         ModifiedOn = a.ModifiedOn.ToUnixTime(),
         EnableLike = !a.LikesList.Contains($";{a.SystemUserId};"),
         EnableDisLike = !a.LikesList.Contains($";{a.SystemUserId};"),
         Message = a.Message,
         Subject = a.Subject
     });
 }