using MongoDB.Entities; namespace PrivaPub.Models.Media { public class MediaAttachment : Entity { public string OwnerAvatarId { get; set; } public string PostId { get; set; } public string Kind { get; set; } public string ContentType { get; set; } public string FilePath { get; set; } public string PreviewPath { get; set; } public long Size { get; set; } public string Description { get; set; } public string Blurhash { get; set; } public int? Width { get; set; } public int? Height { get; set; } public float[] Focus { get; set; } public double? DurationSeconds { get; set; } // audio and video sent to /api/v2/media are processed by a job: "pending" until then, "failed" (with why) if it can't be public string ProcessingState { get; set; } public string ProcessingError { get; set; } public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public DateTime? AttachedAt { get; set; } public string ScheduledStatusId { get; set; }//kept for a scheduled post until it is published or dropped public string ProfileOfAvatarId { get; set; }//a persona's avatar or header (Kind "avatar" or "header"), never a post's // set once nothing holds it any more (its post deleted, edited out, replaced, its root removed, never posted): its // files move out of what /media/files serves at once, and the janitor deletes them after a grace public DateTime? TrashedAt { get; set; } public string TrashReason { get; set; } } public class MediaSecret : Entity { public string Key { get; set; } } }