using System; namespace AuroraDesk.Core.Entities; /// /// 表示 SSH 会话的当前状态 /// public enum SshSessionStatus { Disconnected = 0, Connecting = 1, Connected = 2, Error = 3 } /// /// 表示 SSH 消息的方向 /// public enum SshMessageDirection { Outgoing, Incoming, System } /// /// SSH 消息模型,包含消息内容与元数据 /// public sealed record SshMessage( Guid SessionId, SshMessageDirection Direction, string Content, DateTime Timestamp, bool IsError = false); /// /// 创建 SSH 会话所需的参数 /// public sealed record SshSessionOptions( string Host, int Port, string UserName, string? Password = null, string? PrivateKeyPath = null, string? PrivateKeyPassphrase = null, string? DisplayName = null, bool AllowAnyHostKey = true, string? PreferredShell = null, string? SshExecutablePath = null); /// /// SSH 会话的简要信息 /// public sealed record SshSessionInfo( Guid SessionId, string DisplayName, string Host, int Port, string UserName, SshSessionStatus Status, DateTime CreatedAtUtc);