using eprintServer.Entities; namespace eprintServer.Responses; public class BlogPostResponse { public int Id { get; set; } public string TitleEN { get; set; } = string.Empty; public string TitleAR { get; set; } = string.Empty; public string ContentEN { get; set; } = string.Empty; public string ContentAR { get; set; } = string.Empty; public FileModel? Image { get; set; } public string Author { get; set; } = string.Empty; public DateTime Date { get; set; } public bool Published { get; set; } public DateTime CreatedAt { get; set; } public DateTime UpdatedAt { get; set; } public List TitleDynamic { get; set; } = new List(); public List ContentDynamic { get; set; } = new List(); public static BlogPostResponse FromEntity(Blog blog) => new() { Id = blog.Id, Image = blog.Image, Author = blog.Author, Date = blog.UpdatedAt, Published = blog.Published, CreatedAt = blog.CreatedAt, UpdatedAt = blog.UpdatedAt, TitleDynamic = blog.TitleDynamic, ContentDynamic = blog.ContentDynamic, }; } public class BlogImageUploadResponse { public FileModel? Image { get; set; } public BlogImageUploadResponse(FileModel image) { Image = image; } }