🚚 Rename activity in sphere to timeline

In order to leave the activity keyword for pass service user activity
This commit is contained in:
2025-10-30 21:46:24 +08:00
parent ab23f87a66
commit 0b65bf8dd7
7 changed files with 323 additions and 208 deletions

View File

@@ -0,0 +1,26 @@
using DysonNetwork.Shared.Models;
using NodaTime;
namespace DysonNetwork.Sphere.Timeline;
public class TimelineDiscoveryEvent(List<DiscoveryItem> items) : ITimelineEvent
{
public List<DiscoveryItem> Items { get; set; } = items;
public SnTimelineEvent ToActivity()
{
var now = SystemClock.Instance.GetCurrentInstant();
return new SnTimelineEvent
{
Id = Guid.NewGuid(),
Type = "discovery",
ResourceIdentifier = "discovery",
Data = this,
CreatedAt = now,
UpdatedAt = now,
};
}
}
public record DiscoveryItem(string Type, object Data);