/*
 * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Alliance\ResourceTradingRequestDto.cs
 * Created: 2025-10-22
 * Last Modified: 2025-10-22
 * Description: Request DTO for alliance resource trading operations and market participation
 * Last Edit Notes: Initial creation following established Alliance DTO patterns
 */

using System.ComponentModel.DataAnnotations;

namespace ShadowedRealms.Shared.DTOs.Alliance
{
    /// <summary>
    /// Request DTO for alliance resource trading operations and market participation
    /// </summary>
    public class ResourceTradingRequestDto
    {
        /// <summary>
        /// Type of trade (Direct, Market, Coalition, Emergency)
        /// </summary>
        [Required]
        [StringLength(50)]
        public string TradeType { get; set; } = string.Empty;

        /// <summary>
        /// Trading action (CreateOffer, AcceptOffer, CounterOffer, CancelTrade)
        /// </summary>
        [Required]
        [StringLength(50)]
        public string TradeAction { get; set; } = string.Empty;

        /// <summary>
        /// Resources to offer in trade
        /// </summary>
        public Dictionary<string, decimal> OfferedResources { get; set; } = new();

        /// <summary>
        /// Resources to request in trade
        /// </summary>
        public Dictionary<string, decimal> RequestedResources { get; set; } = new();

        /// <summary>
        /// Target alliance for direct trades
        /// </summary>
        public int? TargetAllianceId { get; set; }

        /// <summary>
        /// Existing trade ID (for modifications)
        /// </summary>
        public int? ExistingTradeId { get; set; }

        /// <summary>
        /// Maximum acceptable exchange rate variance (percentage)
        /// </summary>
        [Range(0, 100)]
        public decimal MaxRateVariance { get; set; } = 10;

        /// <summary>
        /// Trade duration in hours
        /// </summary>
        [Range(1, 168)]
        public int TradeDurationHours { get; set; } = 24;

        /// <summary>
        /// Priority level for this trade (1-5)
        /// </summary>
        [Range(1, 5)]
        public int Priority { get; set; } = 3;

        /// <summary>
        /// Whether to include coalition allies in trade
        /// </summary>
        public bool IncludeCoalitionAllies { get; set; } = false;

        /// <summary>
        /// Trading parameters and special conditions
        /// </summary>
        public Dictionary<string, object>? TradingParameters { get; set; }
    }
}