using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace DysonNetwork.Drive.Models; public class Post : ModelBase { [Key] public Guid Id { get; set; } = Guid.NewGuid(); [Required] [MaxLength(1024)] public string Title { get; set; } = null!; public string Content { get; set; } = string.Empty; public Guid AuthorId { get; set; } public virtual Account? Author { get; set; } public bool IsPublished { get; set; } = false; public bool IsDeleted { get; set; } = false; // Navigation properties public virtual ICollection Views { get; set; } = new List(); public virtual ICollection Attachments { get; set; } = new List(); } public class PostViewInfo { [Key] public Guid Id { get; set; } = Guid.NewGuid(); public Guid PostId { get; set; } public virtual Post? Post { get; set; } public string? UserAgent { get; set; } public string? IpAddress { get; set; } public string? Referrer { get; set; } public string? ViewerId { get; set; } public DateTimeOffset ViewedAt { get; set; } = DateTimeOffset.UtcNow; // Additional metadata public string? CountryCode { get; set; } public string? DeviceType { get; set; } public string? Platform { get; set; } public string? Browser { get; set; } }