aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Models/Post
diff options
context:
space:
mode:
Diffstat (limited to 'src/DevHive.Web/Models/Post')
-rw-r--r--src/DevHive.Web/Models/Post/Comment/BaseCommentWebModel.cs21
-rw-r--r--src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs6
-rw-r--r--src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs19
-rw-r--r--src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs6
4 files changed, 52 insertions, 0 deletions
diff --git a/src/DevHive.Web/Models/Post/Comment/BaseCommentWebModel.cs b/src/DevHive.Web/Models/Post/Comment/BaseCommentWebModel.cs
new file mode 100644
index 0000000..9ba0b87
--- /dev/null
+++ b/src/DevHive.Web/Models/Post/Comment/BaseCommentWebModel.cs
@@ -0,0 +1,21 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using System.Diagnostics.CodeAnalysis;
+
+namespace DevHive.Web.Models.Post.Comment
+{
+ public class BaseCommentWebModel
+ {
+ [NotNull]
+ [Required]
+ public Guid PostId { get; set; }
+
+ [NotNull]
+ [Required]
+ public Guid CommentId { get; set; }
+
+ [NotNull]
+ [Required]
+ public string Message { get; set; }
+ }
+}
diff --git a/src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs b/src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs
new file mode 100644
index 0000000..3680727
--- /dev/null
+++ b/src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs
@@ -0,0 +1,6 @@
+namespace DevHive.Web.Models.Post.Comment
+{
+ public class CreateCommentWebModel : BaseCommentWebModel
+ {
+ }
+}
diff --git a/src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs b/src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs
new file mode 100644
index 0000000..2c4a367
--- /dev/null
+++ b/src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace DevHive.Web.Models.Post.Comment
+{
+ public class ReadCommentWebModel
+ {
+ public Guid PostId { get; set; }
+
+ public string IssuerFirstName { get; set; }
+
+ public string IssuerLastName { get; set; }
+
+ public string IssuerUsername { get; set; }
+
+ public string Message { get; set; }
+
+ public DateTime TimeCreated { get; set; }
+ }
+}
diff --git a/src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs b/src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs
new file mode 100644
index 0000000..49f4540
--- /dev/null
+++ b/src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs
@@ -0,0 +1,6 @@
+namespace DevHive.Web.Models.Post.Comment
+{
+ public class UpdateCommentWebModel : BaseCommentWebModel
+ {
+ }
+}