SocialPub/PrivaPub/Models/ActivityPub/ActivityPubCollection.cs

25 lines
660 B
C#
Raw Permalink Normal View History

2023-02-18 08:52:17 +01:00
using System.Text.Json.Serialization;
2023-02-19 00:43:43 +01:00
namespace PrivaPub.Models.ActivityPub
2023-02-18 08:52:17 +01:00
{
[JsonSerializable(typeof(ActivityPubCollection))]
public class ActivityPubCollection : ActivityPubObject
{
[JsonPropertyName("type")]
public new ObjectType Type => ObjectType.Collection;
[JsonPropertyName("current")]
public string RecentlyUpdatedItem { get; set; }
[JsonPropertyName("first")]
public string FirstItem { get; set; }
[JsonPropertyName("last")]
public string LastItem { get; set; }
[JsonPropertyName("items")]
public List<ActivityPubLink> Items { get; set; }
[JsonPropertyName("totalItems")]
public int TotalItems => Items.Count;
}
}