diff options
| author | transtrike <transtrike@gmail.com> | 2021-01-19 21:46:06 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-01-19 21:46:06 +0200 |
| commit | 8560caa13b7f7d0e80ee712c77efc59a80e8935c (patch) | |
| tree | 02643afdd46122dfd904fbb8632117a5494081a8 /src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs | |
| parent | 661c3194b750e42146e9e28a33da08419b2b2cea (diff) | |
| download | DevHive-8560caa13b7f7d0e80ee712c77efc59a80e8935c.tar DevHive-8560caa13b7f7d0e80ee712c77efc59a80e8935c.tar.gz DevHive-8560caa13b7f7d0e80ee712c77efc59a80e8935c.zip | |
Added attributes to the Web models for validations
Diffstat (limited to 'src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs')
| -rw-r--r-- | src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs b/src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs index d66e5c9..590851d 100644 --- a/src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs +++ b/src/DevHive.Web/Models/Post/Comment/CommentWebModel.cs @@ -1,12 +1,25 @@ using System; +using System.ComponentModel.DataAnnotations; +using System.Diagnostics.CodeAnalysis; namespace DevHive.Web.Models.Post.Comment { public class CommentWebModel { + [NotNull] + [Required] public Guid IssuerId { get; set; } + + [NotNull] + [Required] public Guid PostId { get; set; } + + [NotNull] + [Required] public string Message { get; set; } + + [NotNull] + [Required] public DateTime TimeCreated { get; set; } } } |
