ajout model Comment

This commit is contained in:
Julien LEICHER 2021-12-14 09:59:36 +01:00
parent 8a7c302b5e
commit d930693b58
No known key found for this signature in database
GPG Key ID: BE0761B6A007EB96
2 changed files with 23 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -0,0 +1,6 @@
namespace HackerNet.Domain;
public interface ICommentRepository
{
void Add(Comment comment);
}