Save uncategorized actor data in metadata

This commit is contained in:
2025-12-29 00:51:19 +08:00
parent 44a791db1f
commit 7cb471e978
5 changed files with 2747 additions and 64 deletions

View File

@@ -10,68 +10,34 @@ namespace DysonNetwork.Shared.Models;
public class SnFediverseActor : ModelBase
{
public Guid Id { get; set; } = Guid.NewGuid();
[MaxLength(2048)]
public string Uri { get; set; } = null!;
[MaxLength(256)]
public string Username { get; set; } = null!;
[MaxLength(2048)]
public string? DisplayName { get; set; }
[MaxLength(4096)]
public string? Bio { get; set; }
[MaxLength(2048)]
public string? InboxUri { get; set; }
[MaxLength(2048)]
public string? OutboxUri { get; set; }
[MaxLength(2048)]
public string? FollowersUri { get; set; }
[MaxLength(2048)]
public string? FollowingUri { get; set; }
[MaxLength(2048)]
public string? FeaturedUri { get; set; }
[MaxLength(2048)]
public string? PublicKeyId { get; set; }
[MaxLength(8192)]
public string? PublicKey { get; set; }
[Column(TypeName = "jsonb")]
public Dictionary<string, object>? Metadata { get; set; }
[MaxLength(2048)]
public string? AvatarUrl { get; set; }
[MaxLength(2048)]
public string? HeaderUrl { get; set; }
[MaxLength(2048)] public string Type { get; set; } = "Person";
[MaxLength(2048)] public string Uri { get; set; } = null!;
[MaxLength(256)] public string Username { get; set; } = null!;
[MaxLength(2048)] public string? DisplayName { get; set; }
[MaxLength(4096)] public string? Bio { get; set; }
[MaxLength(2048)] public string? InboxUri { get; set; }
[MaxLength(2048)] public string? OutboxUri { get; set; }
[MaxLength(2048)] public string? FollowersUri { get; set; }
[MaxLength(2048)] public string? FollowingUri { get; set; }
[MaxLength(2048)] public string? FeaturedUri { get; set; }
[MaxLength(2048)] public string? PublicKeyId { get; set; }
[MaxLength(8192)] public string? PublicKey { get; set; }
[Column(TypeName = "jsonb")] public Dictionary<string, object>? Metadata { get; set; }
[MaxLength(2048)] public string? AvatarUrl { get; set; }
[MaxLength(2048)] public string? HeaderUrl { get; set; }
public bool IsBot { get; set; } = false;
public bool IsLocked { get; set; } = false;
public bool IsDiscoverable { get; set; } = true;
public Guid InstanceId { get; set; }
[JsonIgnore]
public SnFediverseInstance Instance { get; set; } = null!;
[JsonIgnore]
public ICollection<SnFediverseContent> Contents { get; set; } = [];
[JsonIgnore]
public ICollection<SnFediverseActivity> Activities { get; set; } = [];
[JsonIgnore]
public ICollection<SnFediverseRelationship> FollowingRelationships { get; set; } = [];
[JsonIgnore]
public ICollection<SnFediverseRelationship> FollowerRelationships { get; set; } = [];
[JsonIgnore] public SnFediverseInstance Instance { get; set; } = null!;
[JsonIgnore] public ICollection<SnFediverseContent> Contents { get; set; } = [];
[JsonIgnore] public ICollection<SnFediverseActivity> Activities { get; set; } = [];
[JsonIgnore] public ICollection<SnFediverseRelationship> FollowingRelationships { get; set; } = [];
[JsonIgnore] public ICollection<SnFediverseRelationship> FollowerRelationships { get; set; } = [];
public Instant? LastFetchedAt { get; set; }
public Instant? LastActivityAt { get; set; }