GsDChat/src/GsDChat.Core/Protocol/HttpModels.cs
2026-10-10 16:40:35 +00:00

48 lines
1.4 KiB
C#

using GsDChat.Core.Models;
namespace GsDChat.Core.Protocol;
public class RegisterRequest
{
public string Username { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string? ServerPassword { get; set; }
public string? InviteToken { get; set; }
}
public class LoginRequest
{
public string Username { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string? ServerPassword { get; set; }
}
public class AuthResponse
{
public bool Success { get; set; }
public string? Token { get; set; }
public string? UserId { get; set; }
public string? Username { get; set; }
public string? Role { get; set; }
public string? ErrorMessage { get; set; }
}
public class ServerInfoResponse
{
public string ServerName { get; set; } = "GsDChat Server";
public string Version { get; set; } = "1.0.0";
public string RegistrationMode { get; set; } = "Open"; // Open or InviteOnly
public bool RequiresServerPassword { get; set; }
public string Motd { get; set; } = "Welcome to GsDChat!";
public long MaxFileSizeMb { get; set; } = 50;
}
public class UploadFileResponse
{
public bool Success { get; set; }
public string? FileId { get; set; }
public string? FileName { get; set; }
public long FileSizeBytes { get; set; }
public string? ChannelId { get; set; }
public string? ErrorMessage { get; set; }
}