Finish migration to MongoDb and general improvements
This commit is contained in:
@@ -4,52 +4,36 @@ using MongoDB.Bson.Serialization.Attributes;
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
|
||||
namespace mstdnCats.Models
|
||||
namespace mstdnCats.Models;
|
||||
|
||||
[BsonIgnoreExtraElements]
|
||||
public class Post
|
||||
{
|
||||
[BsonIgnoreExtraElements]
|
||||
public class Post
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required string mstdnPostId { get; set; }
|
||||
[JsonPropertyName("url")]
|
||||
public required string Url { get; set; }
|
||||
[JsonPropertyName("account")]
|
||||
public required Account Account { get; set; }
|
||||
[JsonPropertyName("media_attachments")]
|
||||
public required List<MediaAttachment> MediaAttachments { get; set; }
|
||||
}
|
||||
[JsonPropertyName("id")] public required string mstdnPostId { get; set; }
|
||||
[JsonPropertyName("url")] public required string Url { get; set; }
|
||||
[JsonPropertyName("account")] public required Account Account { get; set; }
|
||||
|
||||
public class Account
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required string AccId { get; set; }
|
||||
[JsonPropertyName("username")]
|
||||
public required string Username { get; set; }
|
||||
[JsonPropertyName("acct")]
|
||||
public required string Acct { get; set; }
|
||||
[JsonPropertyName("display_name")]
|
||||
public required string DisplayName { get; set; }
|
||||
[JsonPropertyName("bot")]
|
||||
public required Boolean IsBot { get; set; }
|
||||
[JsonPropertyName("url")]
|
||||
public required string Url { get; set; }
|
||||
[JsonPropertyName("avatar_static")]
|
||||
public required string AvatarStatic { get; set; }
|
||||
}
|
||||
[JsonPropertyName("media_attachments")]
|
||||
public required List<MediaAttachment> MediaAttachments { get; set; }
|
||||
}
|
||||
|
||||
public class MediaAttachment
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public required string MediaId { get; set; }
|
||||
[JsonPropertyName("type")]
|
||||
public required string Type { get; set; }
|
||||
[JsonPropertyName("url")]
|
||||
public required string Url { get; set; }
|
||||
[JsonPropertyName("preview_url")]
|
||||
public required string PreviewUrl { get; set; }
|
||||
[JsonPropertyName("remote_url")]
|
||||
public required string RemoteUrl { get; set; }
|
||||
public Boolean Approved { get; set; } = false;
|
||||
public class Account
|
||||
{
|
||||
[JsonPropertyName("id")] public required string AccId { get; set; }
|
||||
[JsonPropertyName("username")] public required string Username { get; set; }
|
||||
[JsonPropertyName("acct")] public required string Acct { get; set; }
|
||||
[JsonPropertyName("display_name")] public required string DisplayName { get; set; }
|
||||
[JsonPropertyName("bot")] public required bool IsBot { get; set; }
|
||||
[JsonPropertyName("url")] public required string Url { get; set; }
|
||||
[JsonPropertyName("avatar_static")] public required string AvatarStatic { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
public class MediaAttachment
|
||||
{
|
||||
[JsonPropertyName("id")] public required string MediaId { get; set; }
|
||||
[JsonPropertyName("type")] public required string Type { get; set; }
|
||||
[JsonPropertyName("url")] public required string Url { get; set; }
|
||||
[JsonPropertyName("preview_url")] public required string PreviewUrl { get; set; }
|
||||
[JsonPropertyName("remote_url")] public required string RemoteUrl { get; set; }
|
||||
public bool Approved { get; set; } = false;
|
||||
}
|
Reference in New Issue
Block a user