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.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Ping.Domain.Abstractions;
|
||||
|
||||
namespace Ping.Domain.Entities
|
||||
{
|
||||
[Table("Server")]
|
||||
public class Server : IAuditable
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public required string Name { get; set; }
|
||||
|
||||
[MaxLength(2048)]
|
||||
public string? IconUrl { get; set; }
|
||||
|
||||
public required long OwnerId { get; set; }
|
||||
|
||||
public User? Owner { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
[Required]
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
public ICollection<ServerMember> Members { get; set; } = new List<ServerMember>();
|
||||
|
||||
public ICollection<Channel> Channels { get; set; } = new List<Channel>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user