.NET 10 solution for Ping, a Discord style chat app: Domain, Application and Infrastructure projects plus the Api host. SignalR for chat and presence, LiveKit for call tokens, EF Core on Postgres, S3 compatible storage for attachments, and OIDC auth shared with the Musify Zitadel instance. Includes the Compose stack for local development.
12 lines
437 B
C#
12 lines
437 B
C#
using Ping.Domain.Entities;
|
|
using Ping.Domain.ValueObjects;
|
|
|
|
namespace Ping.Application.Messages.Responses
|
|
{
|
|
public record AttachmentResponse(Guid Id, string FileName, string ContentType, long SizeBytes, AttachmentKind Kind)
|
|
{
|
|
public static AttachmentResponse FromEntity(Attachment attachment) =>
|
|
new(attachment.Id, attachment.FileName, attachment.ContentType, attachment.SizeBytes, attachment.Kind);
|
|
}
|
|
}
|