-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathComment.cs
More file actions
42 lines (29 loc) · 1.01 KB
/
Comment.cs
File metadata and controls
42 lines (29 loc) · 1.01 KB
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
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using SimplCommerce.Infrastructure.Models;
using SimplCommerce.Module.Core.Models;
namespace SimplCommerce.Module.Comments.Models
{
public class Comment : EntityBase
{
public Comment()
{
Status = CommentStatus.Approved;
CreatedOn = DateTimeOffset.UtcNow;
}
public long UserId { get; set; }
public User User { get; set; }
public string CommentText { get; set; }
[StringLength(450)]
public string CommenterName { get; set; }
public CommentStatus Status { get; set; }
public DateTimeOffset CreatedOn { get; set; }
[StringLength(450)]
public string EntityTypeId { get; set; }
public long EntityId { get; set; }
public long? ParentId { get; set; }
public Comment Parent { get; set; }
public IList<Comment> Replies { get; protected set; } = new List<Comment>();
}
}