20 lines
560 B
C#
20 lines
560 B
C#
namespace Models
|
|
{
|
|
public class Comment : GenericMessage
|
|
{
|
|
public Comment()
|
|
{
|
|
|
|
}
|
|
public Comment(int id, User author, string description, string title, DateTime publishDate) : base(id, author, description, title, publishDate)
|
|
{
|
|
Responses = new List<Comment>();
|
|
}
|
|
|
|
public List<Comment> Responses { get; set; }
|
|
public override string ToString()
|
|
{
|
|
return $"{Author.Name} ({PublishDate.ToString("g")}) - {Description.PadRight(100).Trim()}";
|
|
}
|
|
}
|
|
} |