Files
Admin 0623875dfa Add Ping backend
.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.
2026-09-21 19:32:55 +02:00

36 lines
871 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Ping.Domain.Entities
{
[Table("Message")]
public class Message
{
[Key]
public Guid Id { get; set; }
public required Guid ChannelId { get; set; }
public Channel? Channel { get; set; }
public required long AuthorId { get; set; }
public User? Author { get; set; }
[Required]
[MaxLength(4000)]
public required string Content { get; set; }
public Guid? ReplyToMessageId { get; set; }
[Required]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? EditedAt { get; set; }
public DateTime? DeletedAt { get; set; }
public ICollection<Attachment> Attachments { get; set; } = new List<Attachment>();
}
}