using System.ComponentModel.DataAnnotations; namespace Nuuru.Server.Models.Booru { public class Post { public int Id { get; set; } //we use a ID instead of GUID here because people like it better, use guid for everything else // Storage and identification public string StorageIdentifier { get; set; } // Relative path or storage key (was DiskPath) public string ImageHash { get; set; } // SHA-256 hash for deduplication public string MimeType { get; set; } // Content type (was MIME) // File metadata public long FileSize { get; set; } // File size in bytes public string? OriginalFileName { get; set; } // User's original filename [MaxLength(2000)] public string? Source { get; set; } // Source URL or attribution [MaxLength(5000)] public string? Description { get; set; } // User-provided description // Media dimensions (nullable for non-image/video content) public int? Width { get; set; } public int? Height { get; set; } public int? DurationSeconds { get; set; } // For video/audio files // Thumbnails public string? ThumbnailPath { get; set; } // Timestamps public DateTime UploadedAt { get; set; } // Content rating public PostRating Rating { get; set; } = PostRating.Safe; // Content category public PostCategory Category { get; set; } = PostCategory.Gallery; // Approval status public bool IsApproved { get; set; } = false; public Guid? ApprovedById { get; set; } public ApplicationUser? ApprovedBy { get; set; } public DateTime? ApprovedAt { get; set; } // Comments lock public bool CommentsLocked { get; set; } = false; // Trash public bool IsTrashed { get; set; } = false; public DateTime? TrashedAt { get; set; } public Guid? TrashedById { get; set; } public ApplicationUser? TrashedBy { get; set; } public string? TrashReason { get; set; } // Boints cosmetics public bool HasGoldenFrame { get; set; } = false; // Featured public bool IsFeatured { get; set; } = false; public DateTime? FeaturedAt { get; set; } // Boost (appears first in search results) public DateTime? BoostedUntil { get; set; } // Score (cached Sum of Votes) public int Score { get; set; } = 0; // TagCount (cached count of tags) public int TagCount { get; set; } = 0; // IP tracking (for anonymous uploads) public string? IpAddress { get; set; } // Relationships public Guid UploaderId { get; set; } public ApplicationUser Uploader { get; set; } public ICollection PostTags { get; set; } public ICollection? Comments { get; set; } public ICollection Votes { get; set; } = new List(); public ICollection Favorites { get; set; } = new List(); } }