datetime etc

This commit is contained in:
john 2025-05-04 23:22:30 +02:00
parent 0d7da2ea85
commit 59d660165f
7 changed files with 23 additions and 23 deletions

View file

@ -1,3 +1,3 @@
namespace Femto.Modules.Blog.Domain.Posts.Commands.GetPosts.Dto;
public record PostDto(Guid PostId, string Text, IList<PostMediaDto> Media, DateTime CreatedAt, PostAuthorDto Author);
public record PostDto(Guid PostId, string Text, IList<PostMediaDto> Media, DateTimeOffset CreatedAt, PostAuthorDto Author);

View file

@ -40,7 +40,7 @@ public class GetPostsQueryHandler(IDbConnectionFactory connectionFactory)
page.id as PostId,
page.content as Content,
blog.post_media.url as MediaUrl,
page.created_on as CreatedAt,
page.posted_on as PostedOn,
page.Username,
page.AuthorId
from page
@ -76,7 +76,7 @@ public class GetPostsQueryHandler(IDbConnectionFactory connectionFactory)
postId,
post.Content,
media,
post.CreatedAt,
post.PostedOn,
new PostAuthorDto(post.AuthorId, post.Username)
);
})
@ -92,7 +92,7 @@ public class GetPostsQueryHandler(IDbConnectionFactory connectionFactory)
public Guid PostId { get; set; }
public string Content { get; set; }
public string? MediaUrl { get; set; }
public DateTime CreatedAt { get; set; }
public DateTimeOffset PostedOn { get; set; }
public Guid AuthorId { get; set; }
public string Username { get; set; }
}

View file

@ -7,6 +7,6 @@ public class PostCreatedIntegrationEventHandler : INotificationHandler<PostCreat
{
public async Task Handle(PostCreatedIntegrationEvent notification, CancellationToken cancellationToken)
{
throw new NotImplementedException();
// todo
}
}