From cc9734b155d1cd71536030dd1b2b387792f70e6f Mon Sep 17 00:00:00 2001 From: transtrike Date: Sat, 23 Jan 2021 17:12:14 +0200 Subject: Comment Models fixed --- .../Models/Post/Comment/BaseCommentWebModel.cs | 21 +++++++++++++++++++++ .../Models/Post/Comment/CreateCommentWebModel.cs | 6 ++++++ .../Models/Post/Comment/ReadCommentWebModel.cs | 19 +++++++++++++++++++ .../Models/Post/Comment/UpdateCommentWebModel.cs | 6 ++++++ 4 files changed, 52 insertions(+) create mode 100644 src/DevHive.Web/Models/Post/Comment/BaseCommentWebModel.cs create mode 100644 src/DevHive.Web/Models/Post/Comment/CreateCommentWebModel.cs create mode 100644 src/DevHive.Web/Models/Post/Comment/ReadCommentWebModel.cs create mode 100644 src/DevHive.Web/Models/Post/Comment/UpdateCommentWebModel.cs (limited to 'src/DevHive.Web/Models/Post/Comment') 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 + { + } +} -- cgit v1.2.3