Files
Ping/backend/Core/Ping.Domain/Entities/Channel.cs
T
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

35 lines
823 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Ping.Domain.ValueObjects;
namespace Ping.Domain.Entities
{
[Table("Channel")]
public class Channel
{
[Key]
public Guid Id { get; set; }
public Guid? ServerId { get; set; }
public Server? ServerNavigation { get; set; }
[MaxLength(100)]
public string? Name { get; set; }
[MaxLength(1024)]
public string? Topic { get; set; }
[Required]
public ChannelType Type { get; set; }
[Required]
public int Position { get; set; }
[Required]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public ICollection<ChannelMember> Members { get; set; } = new List<ChannelMember>();
}
}