Files
forkmessager/backend/src/Modules/Stories/Domain/StoryViewer.cs
2026-03-23 01:43:27 +03:00

23 lines
562 B
C#

using Knot.Shared.Kernel;
namespace Knot.Modules.Stories.Domain;
public sealed class StoryViewer : Entity<Guid>
{
public Guid StoryId { get; private set; }
public Guid UserId { get; private set; }
public DateTime ViewedAt { get; private set; }
internal StoryViewer(Guid storyId, Guid userId) : base(Guid.NewGuid())
{
StoryId = storyId;
UserId = userId;
ViewedAt = DateTime.UtcNow;
}
public static StoryViewer Create(Guid storyId, Guid userId)
{
return new StoryViewer(storyId, userId);
}
}