hn-dotnet/Domain/Comment.cs
Julien Leicher 3cd5133f66 add-aspnet-identity (#26)
add exception filter when user not connected
default to needing authentication and apply anonymous to some actions
add user in get requests
add user relation in link, comment and vote
signup and in are ok now!
2020-12-11 17:59:35 +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;
}
}
}