diff --git a/HackerNet.Domain/Comment.cs b/HackerNet.Domain/Comment.cs new file mode 100644 index 0000000..418a6f6 --- /dev/null +++ b/HackerNet.Domain/Comment.cs @@ -0,0 +1,17 @@ +namespace HackerNet.Domain; + +public class Comment +{ + public Guid Id { get; } + public Guid LinkId { get; } + public string Content { get; } + public DateTime CreatedAt { get; } + + public Comment(Guid linkId, string content) + { + Id = Guid.NewGuid(); + LinkId = linkId; + Content = content; + CreatedAt = DateTime.UtcNow; + } +} \ No newline at end of file diff --git a/HackerNet.Domain/ICommentRepository.cs b/HackerNet.Domain/ICommentRepository.cs new file mode 100644 index 0000000..b6f3e0f --- /dev/null +++ b/HackerNet.Domain/ICommentRepository.cs @@ -0,0 +1,6 @@ +namespace HackerNet.Domain; + +public interface ICommentRepository +{ + void Add(Comment comment); +} \ No newline at end of file