using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using LittleShop.Enums; namespace LittleShop.DTOs; public class BotDto { public Guid Id { get; set; } public string Name { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; public BotType Type { get; set; } public BotStatus Status { get; set; } public DateTime CreatedAt { get; set; } public DateTime? LastSeenAt { get; set; } public DateTime? LastConfigSyncAt { get; set; } public bool IsActive { get; set; } public string Version { get; set; } = string.Empty; public string IpAddress { get; set; } = string.Empty; public string PlatformUsername { get; set; } = string.Empty; public string PlatformDisplayName { get; set; } = string.Empty; public string PlatformId { get; set; } = string.Empty; public string PersonalityName { get; set; } = string.Empty; public Dictionary Settings { get; set; } = new(); // Remote Discovery Fields public string? RemoteAddress { get; set; } public int? RemotePort { get; set; } public DateTime? LastDiscoveryAt { get; set; } public string DiscoveryStatus { get; set; } = "Local"; public string? RemoteInstanceId { get; set; } /// /// Indicates if this is a remotely discovered bot /// public bool IsRemote => !string.IsNullOrEmpty(RemoteAddress); /// /// Full remote endpoint URL /// public string? RemoteEndpoint => IsRemote ? $"{RemoteAddress}:{RemotePort}" : null; // Metrics summary public int TotalSessions { get; set; } public int ActiveSessions { get; set; } public decimal TotalRevenue { get; set; } public int TotalOrders { get; set; } } public class BotRegistrationDto { [Required] [StringLength(100)] public string Name { get; set; } = string.Empty; [StringLength(500)] public string Description { get; set; } = string.Empty; public BotType Type { get; set; } [StringLength(50)] public string Version { get; set; } = string.Empty; [StringLength(50)] public string PersonalityName { get; set; } = string.Empty; public Dictionary InitialSettings { get; set; } = new(); } public class BotRegistrationResponseDto { public Guid BotId { get; set; } public string BotKey { get; set; } = string.Empty; public string Name { get; set; } = string.Empty; public Dictionary Settings { get; set; } = new(); } public class BotAuthenticateDto { public string BotKey { get; set; } = string.Empty; } public class BotSettingsDto { public Dictionary Telegram { get; set; } = new(); public Dictionary Privacy { get; set; } = new(); public Dictionary Features { get; set; } = new(); public Dictionary Redis { get; set; } = new(); public List Cryptocurrencies { get; set; } = new(); } public class UpdateBotSettingsDto { public Dictionary Settings { get; set; } = new(); } public class BotHeartbeatDto { public string Version { get; set; } = string.Empty; public string IpAddress { get; set; } = string.Empty; public int ActiveSessions { get; set; } public Dictionary Status { get; set; } = new(); } public class UpdatePlatformInfoDto { public string PlatformUsername { get; set; } = string.Empty; public string PlatformDisplayName { get; set; } = string.Empty; public string PlatformId { get; set; } = string.Empty; } public class BotWizardDto { [Required(ErrorMessage = "Bot name is required")] [StringLength(50)] public string BotName { get; set; } = string.Empty; [Required(ErrorMessage = "Bot username is required")] [StringLength(100)] public string BotUsername { get; set; } = string.Empty; [StringLength(500)] public string Description { get; set; } = string.Empty; [StringLength(50)] public string PersonalityName { get; set; } = string.Empty; public string BotToken { get; set; } = string.Empty; } public class UpdateBotWalletsDto { public Dictionary Wallets { get; set; } = new(); } public class BotWalletEntry { [Required] public string Currency { get; set; } = string.Empty; [Required] [StringLength(500)] public string Address { get; set; } = string.Empty; }