🚚 Rename activity in sphere to timeline
In order to leave the activity keyword for pass service user activity
This commit is contained in:
26
DysonNetwork.Sphere/Timeline/TimelineDiscovery.cs
Normal file
26
DysonNetwork.Sphere/Timeline/TimelineDiscovery.cs
Normal 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);
|
||||
|
||||
Reference in New Issue
Block a user