feat: add IsPublic property to channels and enhance channel creation with visibility options

This commit is contained in:
HueByte
2026-02-19 18:54:50 +01:00
parent 3a0ea0d321
commit 8dfb1a4fb8
14 changed files with 412 additions and 59 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ public record ChannelDto(
Guid Id,
string Name,
string? Topic,
bool IsPublic,
int MessageCount,
DateTimeOffset CreatedAt);
@@ -30,7 +31,7 @@ public record UserDto(
public record SendMessageRequest(string ChannelName, string Content);
public record CreateChannelRequest(string Name, string? Topic = null);
public record CreateChannelRequest(string Name, string? Topic = null, bool IsPublic = true);
public record UpdateTopicRequest(string? Topic);
+1
View File
@@ -5,6 +5,7 @@ public class Channel
public Guid Id { get; set; }
public required string Name { get; set; }
public string? Topic { get; set; }
public bool IsPublic { get; set; } = true;
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
public Guid CreatedByUserId { get; set; }