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

37 lines
980 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Ping.Domain.Abstractions;
namespace Ping.Domain.Entities
{
[Table("User")]
public class User : IAuditable
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public required long Id { get; set; }
[Required]
[MaxLength(64)]
public required string Username { get; set; }
[Required]
[MaxLength(64)]
public required string NormalizedUsername { get; set; }
[MaxLength(64)]
public string? DisplayName { get; set; }
[MaxLength(2048)]
public string? AvatarUrl { get; set; }
[Required]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
[Required]
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public ICollection<ServerMember> ServerMemberships { get; set; } = new List<ServerMember>();
}
}