From 278130d86378a6b2db6ba443631f303fb7d7e207 Mon Sep 17 00:00:00 2001 From: transtrike Date: Wed, 30 Dec 2020 21:21:49 +0200 Subject: Implemented Posts and merged Comment to Post --- src/DevHive.Web/Models/Comment/CommentWebModel.cs | 10 ---------- .../Models/Comment/GetByIdCommentWebModel.cs | 9 --------- .../Models/Post/Comment/CommentWebModel.cs | 10 ++++++++++ .../Models/Post/Post/BasePostWebModel.cs | 10 ++++++++++ .../Models/Post/Post/CreatePostWebModel.cs | 8 ++++++++ src/DevHive.Web/Models/Post/Post/PostWebModel.cs | 21 +++++++++++++++++++++ src/DevHive.Web/Models/Post/Post/UpdatePostModel.cs | 7 +++++++ 7 files changed, 56 insertions(+), 19 deletions(-) delete mode 100644 src/DevHive.Web/Models/Comment/CommentWebModel.cs delete mode 100644 src/DevHive.Web/Models/Comment/GetByIdCommentWebModel.cs create mode 100644 src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs create mode 100644 src/DevHive.Web/Models/Post/Post/BasePostWebModel.cs create mode 100644 src/DevHive.Web/Models/Post/Post/CreatePostWebModel.cs create mode 100644 src/DevHive.Web/Models/Post/Post/PostWebModel.cs create mode 100644 src/DevHive.Web/Models/Post/Post/UpdatePostModel.cs (limited to 'src/DevHive.Web/Models') diff --git a/src/DevHive.Web/Models/Comment/CommentWebModel.cs b/src/DevHive.Web/Models/Comment/CommentWebModel.cs deleted file mode 100644 index 37806a5..0000000 --- a/src/DevHive.Web/Models/Comment/CommentWebModel.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace DevHive.Web.Models.Comment -{ - public class CommentWebModel - { - public Guid UserId { get; set; } - public string Message { get; set; } - } -} \ No newline at end of file diff --git a/src/DevHive.Web/Models/Comment/GetByIdCommentWebModel.cs b/src/DevHive.Web/Models/Comment/GetByIdCommentWebModel.cs deleted file mode 100644 index 3d03348..0000000 --- a/src/DevHive.Web/Models/Comment/GetByIdCommentWebModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace DevHive.Web.Models.Comment -{ - public class GetByIdCommentWebModel : CommentWebModel - { - public DateTime Date { get; set; } - } -} \ No newline at end of file diff --git a/src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs b/src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs new file mode 100644 index 0000000..2a8650a --- /dev/null +++ b/src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs @@ -0,0 +1,10 @@ +using System; + +namespace DevHive.Web.Models.Post.Comment +{ + public class CommentWebModel + { + public Guid IssuerId { get; set; } + public string Message { get; set; } + } +} \ No newline at end of file diff --git a/src/DevHive.Web/Models/Post/Post/BasePostWebModel.cs b/src/DevHive.Web/Models/Post/Post/BasePostWebModel.cs new file mode 100644 index 0000000..caa9925 --- /dev/null +++ b/src/DevHive.Web/Models/Post/Post/BasePostWebModel.cs @@ -0,0 +1,10 @@ +using System; + +namespace DevHive.Web.Models.Post.Post +{ + public class BasePostWebModel + { + public Guid IssuerId { get; set; } + public string Message { get; set; } + } +} \ No newline at end of file diff --git a/src/DevHive.Web/Models/Post/Post/CreatePostWebModel.cs b/src/DevHive.Web/Models/Post/Post/CreatePostWebModel.cs new file mode 100644 index 0000000..7558b2c --- /dev/null +++ b/src/DevHive.Web/Models/Post/Post/CreatePostWebModel.cs @@ -0,0 +1,8 @@ +using System; + +namespace DevHive.Web.Models.Post.Post +{ + public class CreatePostWebModel : BasePostWebModel + { + } +} \ No newline at end of file diff --git a/src/DevHive.Web/Models/Post/Post/PostWebModel.cs b/src/DevHive.Web/Models/Post/Post/PostWebModel.cs new file mode 100644 index 0000000..fa18c3a --- /dev/null +++ b/src/DevHive.Web/Models/Post/Post/PostWebModel.cs @@ -0,0 +1,21 @@ +using DevHive.Web.Models.Post.Comment; + +namespace DevHive.Web.Models.Post.Post +{ + public class PostWebModel + { + //public string Picture { get; set; } + + public string IssuerFirstName { get; set; } + + public string IssuerLastName { get; set; } + + public string IssuerUsername { get; set; } + + public string Message { get; set; } + + //public Files[] Files { get; set; } + + public CommentWebModel[] Comments { get; set; } + } +} \ No newline at end of file diff --git a/src/DevHive.Web/Models/Post/Post/UpdatePostModel.cs b/src/DevHive.Web/Models/Post/Post/UpdatePostModel.cs new file mode 100644 index 0000000..c774900 --- /dev/null +++ b/src/DevHive.Web/Models/Post/Post/UpdatePostModel.cs @@ -0,0 +1,7 @@ +namespace DevHive.Web.Models.Post.Post +{ + public class UpdatePostWebModel : BasePostWebModel + { + //public Files[] Files { get; set; } + } +} \ No newline at end of file -- cgit v1.2.3