Listing post activities

This commit is contained in:
2025-05-01 23:13:31 +08:00
parent b1543f5b08
commit f7e926ad24
3 changed files with 79 additions and 11 deletions

View File

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DysonNetwork.Sphere.Activity;
@ -6,6 +7,7 @@ public enum ActivityVisibility
{
Public,
Friends,
Selected
}
public class Activity : ModelBase
@ -14,8 +16,11 @@ public class Activity : ModelBase
[MaxLength(1024)] public string Type { get; set; } = null!;
[MaxLength(4096)] public string ResourceIdentifier { get; set; } = null!;
public ActivityVisibility Visibility { get; set; } = ActivityVisibility.Public;
public Dictionary<string, object> Meta = new();
[Column(TypeName = "jsonb")] public Dictionary<string, object> Meta = new();
[Column(TypeName = "jsonb")] public ICollection<long> UsersVisible = new List<long>();
public long AccountId { get; set; }
public Account.Account Account { get; set; } = null!;
[NotMapped] public object? Data { get; set; }
}