using File = T120B165_ImgBoard.Models.File; namespace T120B165_ImgBoard.Dtos.Post; public record PostDto( int Id, string Title, string Description, SlimUserDto Author, List Tags, string? FileUrl ) { public static PostDto FromPost(Models.Post post, string? fileUrl) { return new PostDto( Id: post.Id, Title: post.Title, Description: post.Description, Author: SlimUserDto.FromUser(post.Author), Tags: post.Tags, FileUrl: fileUrl ); } }