hn-dotnet/Domain/Comment.cs
2020-12-11 16:00:29 +01:00

22 lines
482 B
C#

using System;
namespace HN.Domain
{
public sealed class Comment : Votable
{
public Guid Id { get; }
public Guid LinkId { get; }
public string Content { get; }
public Guid CreatedBy { get; }
public DateTime CreatedAt { get; }
internal Comment(Guid linkId, Guid createdBy, string content) : base()
{
Id = Guid.NewGuid();
LinkId = linkId;
CreatedBy = createdBy;
Content = content;
CreatedAt = DateTime.UtcNow;
}
}
}