mirror of
https://github.com/Stone-Red-Code/EchoHub.git
synced 2026-09-04 09:06:07 +02:00
feat: add IsPublic property to channels and enhance channel creation with visibility options
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user