ajout model Comment
This commit is contained in:
parent
8a7c302b5e
commit
d930693b58
17
HackerNet.Domain/Comment.cs
Normal file
17
HackerNet.Domain/Comment.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
6
HackerNet.Domain/ICommentRepository.cs
Normal file
6
HackerNet.Domain/ICommentRepository.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace HackerNet.Domain;
|
||||||
|
|
||||||
|
public interface ICommentRepository
|
||||||
|
{
|
||||||
|
void Add(Comment comment);
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user