mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
- Added AvatarPath to ProfileEditResult for user profile updates. - Updated ProfileEditDialog to include avatar selection with a browse button. - Increased dialog height to accommodate new avatar input fields. - Implemented avatar file path handling in the profile edit dialog. feat: introduce moderation features and user roles - Added ServerRole enum to define user roles (Member, Mod, Admin, Owner). - Extended User model to include role, mute, and ban status. - Created ModerationController for user role assignment, kicking, banning, and muting. - Implemented methods in IChatBroadcaster and SignalRBroadcaster for user moderation actions. - Updated database schema with new columns for user roles and moderation states. fix: ensure muted users cannot send messages - Added mute status checks in ChatService to prevent message sending for muted users. - Updated user presence and status handling to reflect role changes and moderation actions. chore: update constants for ASCII art rendering - Introduced AsciiArtHeightHalfBlock constant for improved ASCII art rendering.
21 lines
818 B
C#
21 lines
818 B
C#
namespace EchoHub.Core.Models;
|
|
|
|
public class User
|
|
{
|
|
public Guid Id { get; set; }
|
|
public required string Username { get; set; }
|
|
public required string PasswordHash { get; set; }
|
|
public string? DisplayName { get; set; }
|
|
public string? Bio { get; set; }
|
|
public string? NicknameColor { get; set; }
|
|
public string? AvatarAscii { get; set; }
|
|
public UserStatus Status { get; set; } = UserStatus.Online;
|
|
public string? StatusMessage { get; set; }
|
|
public ServerRole Role { get; set; } = ServerRole.Member;
|
|
public bool IsMuted { get; set; }
|
|
public DateTimeOffset? MutedUntil { get; set; }
|
|
public bool IsBanned { get; set; }
|
|
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
|
public DateTimeOffset LastSeenAt { get; set; } = DateTimeOffset.UtcNow;
|
|
}
|