forked from microsoft/github-copilot-vibe-coding-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComment.cs
More file actions
35 lines (29 loc) · 961 Bytes
/
Copy pathComment.cs
File metadata and controls
35 lines (29 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.ComponentModel.DataAnnotations;
namespace Contoso.BlazorApp.Models;
public class Comment
{
public string Id { get; set; } = string.Empty;
public string PostId { get; set; } = string.Empty;
public string Username { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
}
public class CreateCommentRequest
{
[Required]
[StringLength(50, MinimumLength = 1)]
public string Username { get; set; } = string.Empty;
[Required]
[StringLength(1000, MinimumLength = 1)]
public string Content { get; set; } = string.Empty;
}
public class UpdateCommentRequest
{
[Required]
[StringLength(50, MinimumLength = 1)]
public string Username { get; set; } = string.Empty;
[Required]
[StringLength(1000, MinimumLength = 1)]
public string Content { get; set; } = string.Empty;
}