aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Models/Post/Comment
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-01-23 20:27:11 +0200
committertranstrike <transtrike@gmail.com>2021-01-23 20:27:11 +0200
commite2564f5a2ba87f06ef32137fad5c748f494fa42a (patch)
treec03ef6b884dd2e913466f9d2a389fb068997360e /src/DevHive.Web/Models/Post/Comment
parentcc9734b155d1cd71536030dd1b2b387792f70e6f (diff)
downloadDevHive-e2564f5a2ba87f06ef32137fad5c748f494fa42a.tar
DevHive-e2564f5a2ba87f06ef32137fad5c748f494fa42a.tar.gz
DevHive-e2564f5a2ba87f06ef32137fad5c748f494fa42a.zip
Fixed Comment Models&Mappings
Diffstat (limited to 'src/DevHive.Web/Models/Post/Comment')
-rw-r--r--src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs13
-rw-r--r--src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs2
-rw-r--r--src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs3
3 files changed, 16 insertions, 2 deletions
diff --git a/src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs b/src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs
index 3680727..85c67bf 100644
--- a/src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs
+++ b/src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs
@@ -1,6 +1,17 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using System.Diagnostics.CodeAnalysis;
+
namespace DevHive.Web.Models.Post.Comment
{
- public class CreateCommentWebModel : BaseCommentWebModel
+ public class CreateCommentWebModel
{
+ [NotNull]
+ [Required]
+ public Guid PostId { get; set; }
+
+ [NotNull]
+ [Required]
+ public string Message { get; set; }
}
}
diff --git a/src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs b/src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs
index 2c4a367..5320c3c 100644
--- a/src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs
+++ b/src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs
@@ -4,6 +4,8 @@ namespace DevHive.Web.Models.Post.Comment
{
public class ReadCommentWebModel
{
+ public Guid CommentId { get; set; }
+
public Guid PostId { get; set; }
public string IssuerFirstName { get; set; }
diff --git a/src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs b/src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs
index 49f4540..8e78a48 100644
--- a/src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs
+++ b/src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs
@@ -1,6 +1,7 @@
namespace DevHive.Web.Models.Post.Comment
{
- public class UpdateCommentWebModel : BaseCommentWebModel
+ public class UpdateCommentWebModel
{
+ public string NewMessage { get; set; }
}
}