Complete DTO Layer Implementation - Fix Controller Compilation

- Created 37 individual DTO classes across all domains
- Common DTOs: ErrorResponseDto, SuccessResponseDto for consistent API responses
- Player DTOs: 10 classes for profile, castle, VIP, teleportation, resources, combat prep
- Combat DTOs: 11 classes for field interception system, marches, battles, analytics
- Alliance DTOs: 3 classes for status, coalitions, research advancement
- Kingdom DTOs: 4 classes for status, KvK events, voting, tax distribution
- Purchase DTOs: 6 classes for validation, processing, balance monitoring, fraud detection

All DTOs include proper validation attributes, comprehensive XML documentation,
and support for core innovations (field interception, anti-pay-to-win, coalitions).

Controllers should now compile successfully - ready for compilation testing.
This commit is contained in:
matt 2025-10-19 20:46:41 -05:00
parent 52cd8951fa
commit 3459d449ce
37 changed files with 1610 additions and 1 deletions

View File

@ -0,0 +1,56 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Alliance\AllianceStatusResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for alliance status information
* Last Edit Notes: Individual file implementation for alliance status and coalition data
*/
namespace ShadowedRealms.Shared.DTOs.Alliance
{
/// <summary>
/// Response DTO for alliance status information
/// </summary>
public class AllianceStatusResponseDto
{
/// <summary>
/// Alliance identifier
/// </summary>
public int AllianceId { get; set; }
/// <summary>
/// Alliance name
/// </summary>
public string AllianceName { get; set; } = string.Empty;
/// <summary>
/// Current member count
/// </summary>
public int MemberCount { get; set; }
/// <summary>
/// Alliance level and progression
/// </summary>
public Dictionary<string, object> AllianceLevel { get; set; } = new();
/// <summary>
/// Current coalition memberships
/// </summary>
public List<Dictionary<string, object>> CoalitionMemberships { get; set; } = new();
/// <summary>
/// Alliance territory information
/// </summary>
public Dictionary<string, object> Territory { get; set; } = new();
/// <summary>
/// Research progress across all trees
/// </summary>
public Dictionary<string, object> ResearchProgress { get; set; } = new();
/// <summary>
/// When status was last updated
/// </summary>
public DateTime LastUpdated { get; set; }
}
}

View File

@ -0,0 +1,42 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Alliance\CoalitionCreationRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for coalition creation
* Last Edit Notes: Individual file implementation for coalition creation input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Alliance
{
/// <summary>
/// Request DTO for coalition creation
/// </summary>
public class CoalitionCreationRequestDto
{
/// <summary>
/// Name for the new coalition
/// </summary>
[Required]
[StringLength(100)]
public string CoalitionName { get; set; } = string.Empty;
/// <summary>
/// Initial member alliances
/// </summary>
[Required]
public List<int> MemberAlliances { get; set; } = new();
/// <summary>
/// Coalition purpose and objectives
/// </summary>
[StringLength(500)]
public string? Purpose { get; set; }
/// <summary>
/// Coalition parameters and settings
/// </summary>
public Dictionary<string, object>? CoalitionParameters { get; set; }
}
}

View File

@ -0,0 +1,44 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Alliance\ResearchAdvancementRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for research advancement
* Last Edit Notes: Individual file implementation for research advancement input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Alliance
{
/// <summary>
/// Request DTO for research advancement
/// </summary>
public class ResearchAdvancementRequestDto
{
/// <summary>
/// Research tree branch (Military, Economic, Technology)
/// </summary>
[Required]
[StringLength(50)]
public string ResearchBranch { get; set; } = string.Empty;
/// <summary>
/// Specific research item to advance
/// </summary>
[Required]
[StringLength(100)]
public string ResearchItem { get; set; } = string.Empty;
/// <summary>
/// Resource allocation for research
/// </summary>
[Required]
public Dictionary<string, decimal> ResourceAllocation { get; set; } = new();
/// <summary>
/// Priority level for research
/// </summary>
[Range(1, 5)]
public int Priority { get; set; } = 3;
}
}

View File

@ -0,0 +1,56 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\BattleExecutionResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for battle execution results
* Last Edit Notes: Individual file implementation for battle execution results
*/
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Response DTO for battle execution results
/// </summary>
public class BattleExecutionResponseDto
{
/// <summary>
/// Unique battle identifier
/// </summary>
public int BattleId { get; set; }
/// <summary>
/// Attacking player in the battle
/// </summary>
public int AttackerPlayerId { get; set; }
/// <summary>
/// Defending player in the battle
/// </summary>
public int DefenderPlayerId { get; set; }
/// <summary>
/// Winner of the battle
/// </summary>
public string Winner { get; set; } = string.Empty;
/// <summary>
/// Complete battle results and statistics
/// </summary>
public Dictionary<string, object> BattleResults { get; set; } = new();
/// <summary>
/// Experience gains for participants
/// </summary>
public Dictionary<string, object> ExperienceGains { get; set; } = new();
/// <summary>
/// Resource transfers from battle
/// </summary>
public Dictionary<string, object> ResourceTransfers { get; set; } = new();
/// <summary>
/// When the battle was completed
/// </summary>
public DateTime BattleTime { get; set; }
}
}

View File

@ -0,0 +1,41 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\BattleReplayResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for battle replay data
* Last Edit Notes: Individual file implementation for battle replay information
*/
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Response DTO for battle replay data
/// </summary>
public class BattleReplayResponseDto
{
/// <summary>
/// Battle ID for the replay
/// </summary>
public int BattleId { get; set; }
/// <summary>
/// Complete battle replay data
/// </summary>
public Dictionary<string, object> ReplayData { get; set; } = new();
/// <summary>
/// Battle participants information
/// </summary>
public Dictionary<string, object> Participants { get; set; } = new();
/// <summary>
/// Battle timeline and phases
/// </summary>
public List<Dictionary<string, object>> BattleTimeline { get; set; } = new();
/// <summary>
/// When the replay was generated
/// </summary>
public DateTime ReplayGeneratedAt { get; set; }
}
}

View File

@ -0,0 +1,46 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\CombatAnalyticsResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for combat analytics
* Last Edit Notes: Individual file implementation for combat analytics data
*/
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Response DTO for combat analytics
/// </summary>
public class CombatAnalyticsResponseDto
{
/// <summary>
/// Player ID for analytics
/// </summary>
public int PlayerId { get; set; }
/// <summary>
/// Timeframe covered by analytics
/// </summary>
public int TimeframeDays { get; set; }
/// <summary>
/// Complete combat analytics data
/// </summary>
public Dictionary<string, object> Analytics { get; set; } = new();
/// <summary>
/// Comparative data against kingdom averages
/// </summary>
public Dictionary<string, object>? KingdomComparison { get; set; }
/// <summary>
/// Performance trends over time
/// </summary>
public Dictionary<string, object>? Trends { get; set; }
/// <summary>
/// When analytics were generated
/// </summary>
public DateTime GeneratedAt { get; set; }
}
}

View File

@ -0,0 +1,39 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\CombatEffectivenessRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for combat effectiveness analysis
* Last Edit Notes: Individual file implementation for combat effectiveness analysis input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Request DTO for combat effectiveness analysis
/// </summary>
public class CombatEffectivenessRequestDto
{
/// <summary>
/// Timeframe for effectiveness analysis
/// </summary>
[Range(1, 365)]
public int TimeframeDays { get; set; } = 30;
/// <summary>
/// Include comparison with spending patterns
/// </summary>
public bool IncludeSpendingAnalysis { get; set; } = true;
/// <summary>
/// Specific combat types to analyze
/// </summary>
public List<string>? CombatTypes { get; set; }
/// <summary>
/// Additional analysis parameters
/// </summary>
public Dictionary<string, object>? AnalysisParameters { get; set; }
}
}

View File

@ -0,0 +1,41 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\DragonValidationRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for dragon validation in combat
* Last Edit Notes: Individual file implementation for dragon validation input
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Request DTO for dragon validation in combat
/// </summary>
public class DragonValidationRequestDto
{
/// <summary>
/// Dragon being validated for combat
/// </summary>
[Required]
public Dictionary<string, object> DragonData { get; set; } = new();
/// <summary>
/// Combat context for validation
/// </summary>
[Required]
[StringLength(50)]
public string CombatContext { get; set; } = string.Empty;
/// <summary>
/// Troop composition the dragon will accompany
/// </summary>
public Dictionary<string, int>? TroopComposition { get; set; }
/// <summary>
/// Target information for validation
/// </summary>
public Dictionary<string, object>? TargetInfo { get; set; }
}
}

View File

@ -0,0 +1,47 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\FieldInterceptionRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for field interception execution
* Last Edit Notes: Individual file implementation for field interception execution input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Request DTO for field interception execution
/// </summary>
public class FieldInterceptionRequestDto
{
/// <summary>
/// Player being intercepted
/// </summary>
[Required]
[Range(1, int.MaxValue)]
public int AttackingPlayerId { get; set; }
/// <summary>
/// Interception point coordinates
/// </summary>
[Required]
public (int X, int Y) InterceptionPoint { get; set; }
/// <summary>
/// Troops being deployed for interception
/// </summary>
[Required]
public Dictionary<string, int> DefenderTroops { get; set; } = new();
/// <summary>
/// Dragon deployment for interception
/// </summary>
public Dictionary<string, object>? DragonDeployment { get; set; }
/// <summary>
/// Tactical preferences for the interception
/// </summary>
public Dictionary<string, string>? TacticalPreferences { get; set; }
}
}

View File

@ -0,0 +1,41 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\InterceptionCalculationRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for interception opportunities calculation
* Last Edit Notes: Individual file implementation for interception calculation input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Request DTO for interception opportunities calculation
/// </summary>
public class InterceptionCalculationRequestDto
{
/// <summary>
/// ID of the attacking player to intercept
/// </summary>
[Required]
[Range(1, int.MaxValue)]
public int AttackingPlayerId { get; set; }
/// <summary>
/// Attack route information
/// </summary>
[Required]
public List<(int X, int Y)> AttackRoute { get; set; } = new();
/// <summary>
/// Expected arrival time of attacking forces
/// </summary>
public DateTime? EstimatedArrivalTime { get; set; }
/// <summary>
/// Additional calculation parameters
/// </summary>
public Dictionary<string, object>? CalculationParameters { get; set; }
}
}

View File

@ -0,0 +1,36 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\InterceptionOpportunitiesResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for field interception opportunities - core innovation feature
* Last Edit Notes: Individual file implementation for defender interception calculation system
*/
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Response DTO for field interception opportunities calculation
/// </summary>
public class InterceptionOpportunitiesResponseDto
{
/// <summary>
/// Defending player calculating interceptions
/// </summary>
public int DefendingPlayerId { get; set; }
/// <summary>
/// Attacking player being intercepted
/// </summary>
public int AttackingPlayerId { get; set; }
/// <summary>
/// All available interception opportunities with timing and positioning
/// </summary>
public Dictionary<string, object> InterceptionOpportunities { get; set; } = new();
/// <summary>
/// When the calculation was performed
/// </summary>
public DateTime CalculationTime { get; set; }
}
}

View File

@ -0,0 +1,36 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\MarchCancellationRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for march cancellation
* Last Edit Notes: Individual file implementation for march cancellation input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Request DTO for march cancellation
/// </summary>
public class MarchCancellationRequestDto
{
/// <summary>
/// ID of the march to cancel
/// </summary>
[Required]
[Range(1, int.MaxValue)]
public int MarchId { get; set; }
/// <summary>
/// Reason for cancellation
/// </summary>
[StringLength(200)]
public string? CancellationReason { get; set; }
/// <summary>
/// Whether to apply early return penalties
/// </summary>
public bool AcceptPenalties { get; set; } = true;
}
}

View File

@ -0,0 +1,52 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\MarchInitiationRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for march initiation
* Last Edit Notes: Individual file implementation for march initiation input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Request DTO for march initiation
/// </summary>
public class MarchInitiationRequestDto
{
/// <summary>
/// Target destination coordinates
/// </summary>
[Required]
public (int X, int Y) Destination { get; set; }
/// <summary>
/// Troops being marched
/// </summary>
[Required]
public Dictionary<string, int> Troops { get; set; } = new();
/// <summary>
/// March type (Attack, Rally, Reinforce, etc.)
/// </summary>
[Required]
[StringLength(50)]
public string MarchType { get; set; } = string.Empty;
/// <summary>
/// Dragon accompanying the march
/// </summary>
public Dictionary<string, object>? DragonDetails { get; set; }
/// <summary>
/// March priority and speed preferences
/// </summary>
public Dictionary<string, object>? MarchPreferences { get; set; }
/// <summary>
/// Target player ID (for attacks)
/// </summary>
public int? TargetPlayerId { get; set; }
}
}

View File

@ -0,0 +1,46 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Combat\MarchSpeedResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for march speed calculations
* Last Edit Notes: Individual file implementation for march speed calculation results
*/
namespace ShadowedRealms.Shared.DTOs.Combat
{
/// <summary>
/// Response DTO for march speed calculations
/// </summary>
public class MarchSpeedResponseDto
{
/// <summary>
/// Base march speed
/// </summary>
public decimal BaseSpeed { get; set; }
/// <summary>
/// Final calculated speed after all modifiers
/// </summary>
public decimal FinalSpeed { get; set; }
/// <summary>
/// Speed modifiers applied
/// </summary>
public Dictionary<string, decimal> SpeedModifiers { get; set; } = new();
/// <summary>
/// Estimated travel time to destination
/// </summary>
public TimeSpan EstimatedTravelTime { get; set; }
/// <summary>
/// Any limitations or restrictions on movement
/// </summary>
public List<string> MovementRestrictions { get; set; } = new();
/// <summary>
/// When the calculation was performed
/// </summary>
public DateTime CalculatedAt { get; set; }
}
}

View File

@ -0,0 +1,45 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Common\ErrorResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Standard error response DTO for consistent API error handling across all controllers
* Last Edit Notes: Individual file implementation with validation error support and contextual error information
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Common
{
/// <summary>
/// Standard error response for all API endpoints
/// </summary>
public class ErrorResponseDto
{
/// <summary>
/// Human-readable error message
/// </summary>
[Required]
public string Message { get; set; } = string.Empty;
/// <summary>
/// Error code for client handling
/// </summary>
[Required]
public string Code { get; set; } = string.Empty;
/// <summary>
/// Additional error details
/// </summary>
public Dictionary<string, object>? Details { get; set; }
/// <summary>
/// Validation errors from model binding
/// </summary>
public Dictionary<string, string[]>? ValidationErrors { get; set; }
/// <summary>
/// Timestamp when error occurred
/// </summary>
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
}
}

View File

@ -0,0 +1,36 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Common\SuccessResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Standard success response DTO for API operations that don't return specific data
* Last Edit Notes: Individual file implementation for consistent success messaging across controllers
*/
namespace ShadowedRealms.Shared.DTOs.Common
{
/// <summary>
/// Standard success response for operations that don't return specific data
/// </summary>
public class SuccessResponseDto
{
/// <summary>
/// Success message
/// </summary>
public string Message { get; set; } = "Operation completed successfully";
/// <summary>
/// Success indicator
/// </summary>
public bool Success { get; set; } = true;
/// <summary>
/// Operation timestamp
/// </summary>
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
/// <summary>
/// Additional success details
/// </summary>
public Dictionary<string, object>? Details { get; set; }
}
}

View File

@ -0,0 +1,51 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Kingdom\KingdomStatusResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for kingdom status information
* Last Edit Notes: Individual file implementation for kingdom status and leadership data
*/
namespace ShadowedRealms.Shared.DTOs.Kingdom
{
/// <summary>
/// Response DTO for kingdom status information
/// </summary>
public class KingdomStatusResponseDto
{
/// <summary>
/// Kingdom identifier
/// </summary>
public int KingdomId { get; set; }
/// <summary>
/// Kingdom name
/// </summary>
public string KingdomName { get; set; } = string.Empty;
/// <summary>
/// Current population count
/// </summary>
public int Population { get; set; }
/// <summary>
/// Kingdom leadership information
/// </summary>
public Dictionary<string, object> Leadership { get; set; } = new();
/// <summary>
/// Current KvK event status
/// </summary>
public Dictionary<string, object>? KvKStatus { get; set; }
/// <summary>
/// Kingdom statistics and metrics
/// </summary>
public Dictionary<string, object> Statistics { get; set; } = new();
/// <summary>
/// When the status was last updated
/// </summary>
public DateTime LastUpdated { get; set; }
}
}

View File

@ -0,0 +1,47 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Kingdom\KvKEventRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for KvK event creation
* Last Edit Notes: Individual file implementation for KvK event creation input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Kingdom
{
/// <summary>
/// Request DTO for KvK event creation
/// </summary>
public class KvKEventRequestDto
{
/// <summary>
/// Type of KvK event to create
/// </summary>
[Required]
[StringLength(50)]
public string EventType { get; set; } = string.Empty;
/// <summary>
/// Opposing kingdoms for the event
/// </summary>
[Required]
public List<int> OpposingKingdoms { get; set; } = new();
/// <summary>
/// Event scheduling preferences
/// </summary>
public DateTime? PreferredStartTime { get; set; }
/// <summary>
/// Event duration in hours
/// </summary>
[Range(1, 168)] // 1 hour to 1 week
public int DurationHours { get; set; } = 72;
/// <summary>
/// Event-specific parameters
/// </summary>
public Dictionary<string, object>? EventParameters { get; set; }
}
}

View File

@ -0,0 +1,41 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Kingdom\TaxDistributionResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for tax distribution operations
* Last Edit Notes: Individual file implementation for tax distribution results
*/
namespace ShadowedRealms.Shared.DTOs.Kingdom
{
/// <summary>
/// Response DTO for tax distribution operations
/// </summary>
public class TaxDistributionResponseDto
{
/// <summary>
/// Kingdom performing the distribution
/// </summary>
public int KingdomId { get; set; }
/// <summary>
/// Total tax amount distributed
/// </summary>
public decimal TotalDistributed { get; set; }
/// <summary>
/// Distribution breakdown by recipient
/// </summary>
public Dictionary<string, decimal> DistributionBreakdown { get; set; } = new();
/// <summary>
/// Distribution method used
/// </summary>
public string DistributionMethod { get; set; } = string.Empty;
/// <summary>
/// When the distribution was completed
/// </summary>
public DateTime DistributionTime { get; set; }
}
}

View File

@ -0,0 +1,45 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Kingdom\VotingRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for democratic voting operations
* Last Edit Notes: Individual file implementation for democratic voting input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Kingdom
{
/// <summary>
/// Request DTO for democratic voting operations
/// </summary>
public class VotingRequestDto
{
/// <summary>
/// Type of vote being cast
/// </summary>
[Required]
[StringLength(50)]
public string VoteType { get; set; } = string.Empty;
/// <summary>
/// ID of the item being voted on
/// </summary>
[Required]
[Range(1, int.MaxValue)]
public int VoteItemId { get; set; }
/// <summary>
/// Vote choice (Yes/No, candidate ID, etc.)
/// </summary>
[Required]
[StringLength(100)]
public string VoteChoice { get; set; } = string.Empty;
/// <summary>
/// Optional reasoning for the vote
/// </summary>
[StringLength(500)]
public string? VoteReasoning { get; set; }
}
}

View File

@ -0,0 +1,37 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\AllianceJoinRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for alliance join operations
* Last Edit Notes: Individual file implementation for alliance join input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Request DTO for alliance join operations
/// </summary>
public class AllianceJoinRequestDto
{
/// <summary>
/// Alliance to join
/// </summary>
[Required]
[Range(1, int.MaxValue)]
public int AllianceId { get; set; }
/// <summary>
/// Optional message to alliance leadership
/// </summary>
[StringLength(500)]
public string? Message { get; set; }
/// <summary>
/// Player's preferred role if accepted
/// </summary>
[StringLength(50)]
public string? PreferredRole { get; set; }
}
}

View File

@ -0,0 +1,34 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\CastleUpgradeRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for castle upgrade operations
* Last Edit Notes: Individual file implementation for castle upgrade input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Request DTO for castle upgrade operations
/// </summary>
public class CastleUpgradeRequestDto
{
/// <summary>
/// Whether to use VIP bonuses if available
/// </summary>
public bool UseVipBonuses { get; set; } = true;
/// <summary>
/// Resource allocation for upgrade
/// </summary>
public Dictionary<string, decimal> ResourceAllocation { get; set; } = new();
/// <summary>
/// Priority level for upgrade processing
/// </summary>
[Range(1, 5)]
public int Priority { get; set; } = 3;
}
}

View File

@ -0,0 +1,46 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\CastleUpgradeResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for castle upgrade operations
* Last Edit Notes: Individual file implementation for castle upgrade results
*/
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Response DTO for castle upgrade operations
/// </summary>
public class CastleUpgradeResponseDto
{
/// <summary>
/// Player ID who performed the upgrade
/// </summary>
public int PlayerId { get; set; }
/// <summary>
/// Whether the upgrade was successful
/// </summary>
public bool Success { get; set; }
/// <summary>
/// New castle level after upgrade
/// </summary>
public int NewCastleLevel { get; set; }
/// <summary>
/// Benefits granted from the upgrade
/// </summary>
public Dictionary<string, object> BenefitsGranted { get; set; } = new();
/// <summary>
/// When the upgrade was completed
/// </summary>
public DateTime UpgradeTime { get; set; }
/// <summary>
/// Resources consumed in the upgrade
/// </summary>
public Dictionary<string, decimal> ResourcesConsumed { get; set; } = new();
}
}

View File

@ -0,0 +1,36 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\CombatPreparationResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for combat preparation status
* Last Edit Notes: Individual file implementation for combat preparation data
*/
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Response DTO for combat preparation status
/// </summary>
public class CombatPreparationResponseDto
{
/// <summary>
/// Player ID preparing for combat
/// </summary>
public int PlayerId { get; set; }
/// <summary>
/// Preparation status details
/// </summary>
public Dictionary<string, object> PreparationStatus { get; set; } = new();
/// <summary>
/// Available march options
/// </summary>
public List<Dictionary<string, object>> MarchOptions { get; set; } = new();
/// <summary>
/// When preparation was calculated
/// </summary>
public DateTime PreparationTime { get; set; }
}
}

View File

@ -0,0 +1,42 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\ExperienceProcessingRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for experience processing operations
* Last Edit Notes: Individual file implementation for experience processing input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Request DTO for experience processing operations
/// </summary>
public class ExperienceProcessingRequestDto
{
/// <summary>
/// Type of experience gain
/// </summary>
[Required]
[StringLength(50)]
public string ExperienceType { get; set; } = string.Empty;
/// <summary>
/// Amount of experience to process
/// </summary>
[Range(0, decimal.MaxValue)]
public decimal ExperienceAmount { get; set; }
/// <summary>
/// Source of the experience
/// </summary>
[StringLength(100)]
public string? Source { get; set; }
/// <summary>
/// Additional context for experience processing
/// </summary>
public Dictionary<string, object>? Context { get; set; }
}
}

View File

@ -0,0 +1,89 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\PlayerProfileResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for player profile information including core stats and progression
* Last Edit Notes: Individual file implementation with complete player profile data structure
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Response DTO for comprehensive player profile information
/// </summary>
public class PlayerProfileResponseDto
{
/// <summary>
/// Player's unique identifier
/// </summary>
public int PlayerId { get; set; }
/// <summary>
/// Player's username
/// </summary>
[Required]
public string PlayerName { get; set; } = string.Empty;
/// <summary>
/// Current castle level (capped at 30)
/// </summary>
public int CastleLevel { get; set; }
/// <summary>
/// Overall player power rating
/// </summary>
public decimal Power { get; set; }
/// <summary>
/// Current VIP tier
/// </summary>
public int VipTier { get; set; }
/// <summary>
/// Kingdom the player belongs to
/// </summary>
public int KingdomId { get; set; }
/// <summary>
/// Alliance ID if player is in an alliance
/// </summary>
public int? AllianceId { get; set; }
/// <summary>
/// Alliance name if applicable
/// </summary>
public string? AllianceName { get; set; }
/// <summary>
/// Player's position on the map
/// </summary>
public (int X, int Y) Position { get; set; }
/// <summary>
/// Player's current resource counts
/// </summary>
public Dictionary<string, decimal> Resources { get; set; } = new();
/// <summary>
/// Combat statistics
/// </summary>
public Dictionary<string, object> CombatStats { get; set; } = new();
/// <summary>
/// Account creation date
/// </summary>
public DateTime CreatedAt { get; set; }
/// <summary>
/// Last active timestamp
/// </summary>
public DateTime LastActiveAt { get; set; }
/// <summary>
/// Whether player is active
/// </summary>
public bool IsActive { get; set; }
}
}

View File

@ -0,0 +1,46 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\ResourceStatusResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for resource status information
* Last Edit Notes: Individual file implementation for resource status data
*/
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Response DTO for resource status information
/// </summary>
public class ResourceStatusResponseDto
{
/// <summary>
/// Player ID for resource status
/// </summary>
public int PlayerId { get; set; }
/// <summary>
/// Current resource amounts
/// </summary>
public Dictionary<string, decimal> CurrentResources { get; set; } = new();
/// <summary>
/// Resource production rates
/// </summary>
public Dictionary<string, decimal> ProductionRates { get; set; } = new();
/// <summary>
/// Storage capacity limits
/// </summary>
public Dictionary<string, decimal> StorageCapacity { get; set; } = new();
/// <summary>
/// Protected resource amounts
/// </summary>
public Dictionary<string, decimal> ProtectedAmounts { get; set; } = new();
/// <summary>
/// When resources were last calculated
/// </summary>
public DateTime LastCalculated { get; set; }
}
}

View File

@ -0,0 +1,40 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\TeleportationRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for teleportation operations
* Last Edit Notes: Individual file implementation for teleportation input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Request DTO for teleportation operations
/// </summary>
public class TeleportationRequestDto
{
/// <summary>
/// Target destination coordinates
/// </summary>
[Required]
public (int X, int Y) Destination { get; set; }
/// <summary>
/// Whether to use VIP teleportation benefits
/// </summary>
public bool UseVipBenefits { get; set; } = true;
/// <summary>
/// Teleportation priority level
/// </summary>
[Range(1, 5)]
public int Priority { get; set; } = 3;
/// <summary>
/// Override safety restrictions (requires special permissions)
/// </summary>
public bool OverrideSafetyRestrictions { get; set; } = false;
}
}

View File

@ -0,0 +1,41 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\TeleportationResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for teleportation operations
* Last Edit Notes: Individual file implementation for teleportation results
*/
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Response DTO for teleportation operations
/// </summary>
public class TeleportationResponseDto
{
/// <summary>
/// Whether teleportation was successful
/// </summary>
public bool Success { get; set; }
/// <summary>
/// New player position after teleportation
/// </summary>
public (int X, int Y) NewPosition { get; set; }
/// <summary>
/// Cost breakdown for the teleportation
/// </summary>
public Dictionary<string, decimal> CostBreakdown { get; set; } = new();
/// <summary>
/// Any restrictions that were applied
/// </summary>
public List<string> RestrictionsApplied { get; set; } = new();
/// <summary>
/// When the teleportation occurred
/// </summary>
public DateTime TeleportationTime { get; set; }
}
}

View File

@ -0,0 +1,31 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\VipStatusResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for VIP status information
* Last Edit Notes: Individual file implementation for VIP status data
*/
namespace ShadowedRealms.Shared.DTOs.Player
{
/// <summary>
/// Response DTO for VIP status information
/// </summary>
public class VipStatusResponseDto
{
/// <summary>
/// Player ID for VIP status
/// </summary>
public int PlayerId { get; set; }
/// <summary>
/// Complete VIP status information
/// </summary>
public Dictionary<string, object> VipStatus { get; set; } = new();
/// <summary>
/// When the status was last updated
/// </summary>
public DateTime LastUpdated { get; set; }
}
}

View File

@ -0,0 +1,46 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\BalanceMonitoringResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for balance monitoring results
* Last Edit Notes: Individual file implementation for anti-pay-to-win balance monitoring results
*/
namespace ShadowedRealms.Shared.DTOs.Purchase
{
/// <summary>
/// Response DTO for balance monitoring results
/// </summary>
public class BalanceMonitoringResponseDto
{
/// <summary>
/// Player being monitored
/// </summary>
public int PlayerId { get; set; }
/// <summary>
/// Overall balance assessment
/// </summary>
public string BalanceStatus { get; set; } = string.Empty;
/// <summary>
/// Detailed balance metrics
/// </summary>
public Dictionary<string, object> BalanceMetrics { get; set; } = new();
/// <summary>
/// Spending vs performance analysis
/// </summary>
public Dictionary<string, object> SpendingAnalysis { get; set; } = new();
/// <summary>
/// Recommended adjustments for balance
/// </summary>
public List<string> BalanceRecommendations { get; set; } = new();
/// <summary>
/// When monitoring was performed
/// </summary>
public DateTime MonitoringTime { get; set; }
}
}

View File

@ -0,0 +1,40 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\FraudDetectionRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for fraud detection analysis
* Last Edit Notes: Individual file implementation for fraud detection input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Purchase
{
/// <summary>
/// Request DTO for fraud detection analysis
/// </summary>
public class FraudDetectionRequestDto
{
/// <summary>
/// Transaction details to analyze
/// </summary>
[Required]
public Dictionary<string, object> TransactionData { get; set; } = new();
/// <summary>
/// Analysis depth level
/// </summary>
[Range(1, 5)]
public int AnalysisDepth { get; set; } = 3;
/// <summary>
/// Include historical pattern analysis
/// </summary>
public bool IncludeHistoricalAnalysis { get; set; } = true;
/// <summary>
/// Additional fraud detection parameters
/// </summary>
public Dictionary<string, object>? DetectionParameters { get; set; }
}
}

View File

@ -0,0 +1,62 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\PurchaseProcessingRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for purchase processing
* Last Edit Notes: Individual file implementation for purchase processing input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Purchase
{
/// <summary>
/// Request DTO for purchase processing
/// </summary>
public class PurchaseProcessingRequestDto
{
/// <summary>
/// Item or package being purchased
/// </summary>
[Required]
[StringLength(100)]
public string ItemId { get; set; } = string.Empty;
/// <summary>
/// Quantity being purchased
/// </summary>
[Range(1, int.MaxValue)]
public int Quantity { get; set; } = 1;
/// <summary>
/// Purchase amount in local currency
/// </summary>
[Range(0.01, double.MaxValue)]
public decimal PurchaseAmount { get; set; }
/// <summary>
/// Currency code for the purchase
/// </summary>
[Required]
[StringLength(3)]
public string CurrencyCode { get; set; } = string.Empty;
/// <summary>
/// External transaction ID from payment processor
/// </summary>
[Required]
[StringLength(200)]
public string TransactionId { get; set; } = string.Empty;
/// <summary>
/// Payment method used
/// </summary>
[StringLength(50)]
public string? PaymentMethod { get; set; }
/// <summary>
/// Additional purchase metadata
/// </summary>
public Dictionary<string, object>? PurchaseMetadata { get; set; }
}
}

View File

@ -0,0 +1,46 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\PurchaseValidationResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for purchase validation results
* Last Edit Notes: Individual file implementation for purchase validation and fraud detection results
*/
namespace ShadowedRealms.Shared.DTOs.Purchase
{
/// <summary>
/// Response DTO for purchase validation results
/// </summary>
public class PurchaseValidationResponseDto
{
/// <summary>
/// Whether the purchase is valid and approved
/// </summary>
public bool IsValid { get; set; }
/// <summary>
/// Player making the purchase
/// </summary>
public int PlayerId { get; set; }
/// <summary>
/// Detailed validation results
/// </summary>
public Dictionary<string, object> ValidationResults { get; set; } = new();
/// <summary>
/// Any warnings about the purchase
/// </summary>
public List<string> Warnings { get; set; } = new();
/// <summary>
/// Fraud risk assessment
/// </summary>
public Dictionary<string, object> FraudRisk { get; set; } = new();
/// <summary>
/// When validation was performed
/// </summary>
public DateTime ValidationTime { get; set; }
}
}

View File

@ -0,0 +1,46 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\SpendingAnalyticsResponseDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Response DTO for spending analytics
* Last Edit Notes: Individual file implementation for spending analytics data
*/
namespace ShadowedRealms.Shared.DTOs.Purchase
{
/// <summary>
/// Response DTO for spending analytics
/// </summary>
public class SpendingAnalyticsResponseDto
{
/// <summary>
/// Player ID for spending analytics
/// </summary>
public int PlayerId { get; set; }
/// <summary>
/// Timeframe covered by analytics
/// </summary>
public int TimeframeDays { get; set; }
/// <summary>
/// Complete spending analytics
/// </summary>
public Dictionary<string, object> SpendingAnalytics { get; set; } = new();
/// <summary>
/// Comparative data against other players
/// </summary>
public Dictionary<string, object>? Comparisons { get; set; }
/// <summary>
/// Spending patterns and trends
/// </summary>
public Dictionary<string, object>? Trends { get; set; }
/// <summary>
/// When analytics were generated
/// </summary>
public DateTime GeneratedAt { get; set; }
}
}

View File

@ -0,0 +1,40 @@
/*
* File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\VipAdvancementRequestDto.cs
* Created: 2025-10-19
* Last Modified: 2025-10-19
* Description: Request DTO for VIP advancement operations
* Last Edit Notes: Individual file implementation for VIP advancement input validation
*/
using System.ComponentModel.DataAnnotations;
namespace ShadowedRealms.Shared.DTOs.Purchase
{
/// <summary>
/// Request DTO for VIP advancement operations
/// </summary>
public class VipAdvancementRequestDto
{
/// <summary>
/// Purchase amount contributing to VIP advancement
/// </summary>
[Range(0.01, double.MaxValue)]
public decimal PurchaseAmount { get; set; }
/// <summary>
/// Whether to apply secret tier progression
/// </summary>
public bool AllowSecretTiers { get; set; } = true;
/// <summary>
/// External transaction reference
/// </summary>
[StringLength(200)]
public string? TransactionReference { get; set; }
/// <summary>
/// Additional advancement parameters
/// </summary>
public Dictionary<string, object>? AdvancementParameters { get; set; }
}
}

View File

@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="DTOs\" />
<Folder Include="Constants\" />
<Folder Include="Enums\" />
<Folder Include="Extensions\" />