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!
22 lines
482 B
C#
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;
|
|
}
|
|
}
|
|
} |