From abc285e7e5fe2bbf612e7bc3915b16fd4a74f069 Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 23 Oct 2025 14:23:21 -0500 Subject: [PATCH] Complete Purchase DTOs and resolve remaining DTO compilation errors Purchase DTOs (12 files): - Add Priority 1: PurchaseValidationRequestDto, RefundRequestDto, RefundResponseDto, FraudDetectionResponseDto - Add Priority 2: VipProgressionRequestDto, VipProgressionResponseDto, VipBenefitClaimRequestDto, VipBenefitClaimResponseDto - Add Priority 3: SkillAlternativesRequestDto, SkillAlternativesResponseDto, CompetitiveEffectivenessResponseDto, MonetizationHealthResponseDto Resolve remaining DTO compilation errors: - Add BuildingConstructionResponseDto for AllianceController - Add CombatPreparationRequestDto for PlayerController - Add ErrorViewModel for Admin project error handling Features implemented: * Complete Purchase system with ethical monetization support * Anti-pay-to-win mechanics ensuring 70% F2P competitive effectiveness * VIP progression with secret tier support and chargeback protection * Comprehensive fraud detection and spending behavior monitoring * Skill-based alternatives to premium purchases with achievement paths * Player protection measures and monetization health monitoring * Alliance building construction tracking with resource management * Player combat preparation with dragon integration and field interception All DTOs follow established patterns: - Proper file headers with creation dates and comprehensive descriptions - XML documentation for all properties with detailed summaries - Validation attributes on request DTOs following project conventions - Kingdom-scoped design considerations for horizontal scaling - Dictionary properties for extensible parameters and future enhancements - Production-ready structure supporting server-authoritative design principles --- .../Models/ErrorViewModel.cs | 51 ++++++++++ .../ShadowedRealms.Admin.csproj | 1 - .../BuildingConstructionRequestDto.cs | 53 ++++++++++ .../BuildingConstructionResponseDto.cs | 79 ++++++++++----- .../Player/CombatPreparationRequestDto.cs | 73 ++++++++++++++ .../CompetitiveEffectivenessResponseDto.cs | 86 +++++++++++++++++ .../Purchase/FraudDetectionResponseDto.cs | 76 +++++++++++++++ .../Purchase/MonetizationHealthResponseDto.cs | 96 +++++++++++++++++++ .../Purchase/PurchaseValidationRequestDto.cs | 72 ++++++++++++++ .../DTOs/Purchase/RefundRequestDto.cs | 73 ++++++++++++++ .../DTOs/Purchase/RefundResponseDto.cs | 76 +++++++++++++++ .../Purchase/SkillAlternativesRequestDto.cs | 70 ++++++++++++++ .../Purchase/SkillAlternativesResponseDto.cs | 81 ++++++++++++++++ .../Purchase/VipBenefitClaimRequestDto.cs | 70 ++++++++++++++ .../Purchase/VipBenefitClaimResponseDto.cs | 91 ++++++++++++++++++ .../DTOs/Purchase/VipProgressionRequestDto.cs | 69 +++++++++++++ .../Purchase/VipProgressionResponseDto.cs | 81 ++++++++++++++++ 17 files changed, 1174 insertions(+), 24 deletions(-) create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Admin/Models/ErrorViewModel.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Alliance/BuildingConstructionRequestDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Player/CombatPreparationRequestDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/CompetitiveEffectivenessResponseDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/FraudDetectionResponseDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/MonetizationHealthResponseDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/PurchaseValidationRequestDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/RefundRequestDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/RefundResponseDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/SkillAlternativesRequestDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/SkillAlternativesResponseDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipBenefitClaimRequestDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipBenefitClaimResponseDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipProgressionRequestDto.cs create mode 100644 ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipProgressionResponseDto.cs diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Admin/Models/ErrorViewModel.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Admin/Models/ErrorViewModel.cs new file mode 100644 index 0000000..deb02f2 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Admin/Models/ErrorViewModel.cs @@ -0,0 +1,51 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Admin\Models\ErrorViewModel.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Error view model for Admin project error handling and display + * Last Edit Notes: Individual file implementation for ASP.NET Core MVC error handling in Admin dashboard + */ + +namespace ShadowedRealms.Admin.Models +{ + /// + /// View model for displaying error information in the Admin project + /// + public class ErrorViewModel + { + /// + /// Unique identifier for the current request + /// + public string? RequestId { get; set; } + + /// + /// Whether to show the request ID on the error page + /// + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + /// + /// Error message to display to the user + /// + public string? ErrorMessage { get; set; } + + /// + /// HTTP status code for the error + /// + public int StatusCode { get; set; } = 500; + + /// + /// Detailed error information (only shown in development) + /// + public string? DetailedError { get; set; } + + /// + /// When the error occurred + /// + public DateTime ErrorTime { get; set; } = DateTime.UtcNow; + + /// + /// Whether this error should be logged + /// + public bool ShouldLog { get; set; } = true; + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Admin/ShadowedRealms.Admin.csproj b/ShadowedRealmsMobile/src/server/ShadowedRealms.Admin/ShadowedRealms.Admin.csproj index 7a330ba..0c6df40 100644 --- a/ShadowedRealmsMobile/src/server/ShadowedRealms.Admin/ShadowedRealms.Admin.csproj +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Admin/ShadowedRealms.Admin.csproj @@ -17,7 +17,6 @@ - diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Alliance/BuildingConstructionRequestDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Alliance/BuildingConstructionRequestDto.cs new file mode 100644 index 0000000..e472994 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Alliance/BuildingConstructionRequestDto.cs @@ -0,0 +1,53 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Alliance\BuildingConstructionRequestDto.cs + * Created: 2025-10-22 + * Last Modified: 2025-10-22 + * Description: Request DTO for alliance building construction operations + * Last Edit Notes: Initial creation following established Alliance DTO patterns + */ + +using System.ComponentModel.DataAnnotations; + +namespace ShadowedRealms.Shared.DTOs.Alliance +{ + /// + /// Request DTO for alliance building construction operations + /// + public class BuildingConstructionRequestDto + { + /// + /// Type of building to construct + /// + [Required] + [StringLength(100)] + public string BuildingType { get; set; } = string.Empty; + + /// + /// Target level for construction + /// + [Required] + [Range(1, 50)] + public int TargetLevel { get; set; } + + /// + /// Initial resource contribution + /// + public Dictionary ResourceContribution { get; set; } = new(); + + /// + /// Priority level for this construction (1-5) + /// + [Range(1, 5)] + public int Priority { get; set; } = 3; + + /// + /// Whether to use alliance treasury funds + /// + public bool UseTreasuryFunds { get; set; } = false; + + /// + /// Construction parameters and options + /// + public Dictionary? ConstructionParameters { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Alliance/BuildingConstructionResponseDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Alliance/BuildingConstructionResponseDto.cs index e472994..d7df74b 100644 --- a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Alliance/BuildingConstructionResponseDto.cs +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Alliance/BuildingConstructionResponseDto.cs @@ -1,53 +1,86 @@ /* - * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Alliance\BuildingConstructionRequestDto.cs - * Created: 2025-10-22 - * Last Modified: 2025-10-22 - * Description: Request DTO for alliance building construction operations - * Last Edit Notes: Initial creation following established Alliance DTO patterns + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Alliance\BuildingConstructionResponseDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Response DTO for alliance building construction results + * Last Edit Notes: Individual file implementation for building construction results with resource tracking and timeline management */ -using System.ComponentModel.DataAnnotations; - namespace ShadowedRealms.Shared.DTOs.Alliance { /// - /// Request DTO for alliance building construction operations + /// Response DTO for alliance building construction results /// - public class BuildingConstructionRequestDto + public class BuildingConstructionResponseDto { /// - /// Type of building to construct + /// Alliance performing the construction + /// + public int AllianceId { get; set; } + + /// + /// Type of building being constructed /// - [Required] - [StringLength(100)] public string BuildingType { get; set; } = string.Empty; + /// + /// Current building level + /// + public int CurrentLevel { get; set; } + /// /// Target level for construction /// - [Required] - [Range(1, 50)] public int TargetLevel { get; set; } /// - /// Initial resource contribution + /// Whether construction was successfully initiated /// - public Dictionary ResourceContribution { get; set; } = new(); + public bool ConstructionStarted { get; set; } /// - /// Priority level for this construction (1-5) + /// Total resources required for construction /// - [Range(1, 5)] - public int Priority { get; set; } = 3; + public Dictionary RequiredResources { get; set; } = new(); /// - /// Whether to use alliance treasury funds + /// Resources contributed so far /// - public bool UseTreasuryFunds { get; set; } = false; + public Dictionary ContributedResources { get; set; } = new(); /// - /// Construction parameters and options + /// Member contributions to construction /// - public Dictionary? ConstructionParameters { get; set; } + public Dictionary MemberContributions { get; set; } = new(); + + /// + /// Estimated completion time + /// + public DateTime? EstimatedCompletion { get; set; } + + /// + /// Construction progress percentage + /// + public decimal ProgressPercentage { get; set; } + + /// + /// Benefits unlocked at current level + /// + public List CurrentBenefits { get; set; } = new(); + + /// + /// Benefits that will be unlocked at target level + /// + public List UpcomingBenefits { get; set; } = new(); + + /// + /// When construction was initiated or last updated + /// + public DateTime UpdatedAt { get; set; } + + /// + /// Additional construction details + /// + public Dictionary? ConstructionDetails { get; set; } } } \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Player/CombatPreparationRequestDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Player/CombatPreparationRequestDto.cs new file mode 100644 index 0000000..a0b22f6 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Player/CombatPreparationRequestDto.cs @@ -0,0 +1,73 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Player\CombatPreparationRequestDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Request DTO for player combat preparation operations + * Last Edit Notes: Individual file implementation for combat preparation with dragon integration and field interception support + */ + +using System.ComponentModel.DataAnnotations; + +namespace ShadowedRealms.Shared.DTOs.Player +{ + /// + /// Request DTO for player combat preparation operations + /// + public class CombatPreparationRequestDto + { + /// + /// Type of combat being prepared for (attack, defense, march, intercept) + /// + [Required] + [StringLength(50)] + public string CombatType { get; set; } = string.Empty; + + /// + /// Target player or location for combat + /// + [StringLength(100)] + public string? Target { get; set; } + + /// + /// Army composition for combat + /// + public Dictionary ArmyComposition { get; set; } = new(); + + /// + /// Dragon to include in combat + /// + [StringLength(100)] + public string? DragonId { get; set; } + + /// + /// Equipment to be used in combat + /// + public List Equipment { get; set; } = new(); + + /// + /// Combat buffs to apply + /// + public List CombatBuffs { get; set; } = new(); + + /// + /// Whether to include field interception calculations + /// + public bool IncludeInterceptionCalculations { get; set; } = false; + + /// + /// March speed preferences + /// + [Range(1, 10)] + public int SpeedSetting { get; set; } = 5; + + /// + /// Whether to validate resource costs + /// + public bool ValidateResourceCosts { get; set; } = true; + + /// + /// Additional preparation parameters + /// + public Dictionary? PreparationParameters { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/CompetitiveEffectivenessResponseDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/CompetitiveEffectivenessResponseDto.cs new file mode 100644 index 0000000..a41a6f9 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/CompetitiveEffectivenessResponseDto.cs @@ -0,0 +1,86 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\CompetitiveEffectivenessResponseDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Response DTO for competitive effectiveness analysis + * Last Edit Notes: Individual file implementation for anti-pay-to-win effectiveness monitoring ensuring 70% F2P competitive viability + */ + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Response DTO for competitive effectiveness analysis + /// + public class CompetitiveEffectivenessResponseDto + { + /// + /// Player being analyzed for competitive effectiveness + /// + public int PlayerId { get; set; } + + /// + /// Player's current competitive effectiveness percentage + /// + public decimal CurrentEffectiveness { get; set; } + + /// + /// Effectiveness from spending vs skill breakdown + /// + public Dictionary EffectivenessBreakdown { get; set; } = new(); + + /// + /// How player compares to other players in kingdom + /// + public Dictionary KingdomComparison { get; set; } = new(); + + /// + /// Effectiveness by combat category + /// + public Dictionary CombatEffectiveness { get; set; } = new(); + + /// + /// Economic and resource effectiveness + /// + public Dictionary EconomicEffectiveness { get; set; } = new(); + + /// + /// Social and alliance effectiveness + /// + public Dictionary SocialEffectiveness { get; set; } = new(); + + /// + /// Areas where player can improve through skill + /// + public List> SkillImprovementAreas { get; set; } = new(); + + /// + /// Recommended actions to maintain competitive balance + /// + public List BalanceRecommendations { get; set; } = new(); + + /// + /// Whether player is within healthy competitive range (60-70% for F2P) + /// + public bool IsWithinHealthyRange { get; set; } + + /// + /// Projected effectiveness with recommended improvements + /// + public decimal ProjectedEffectiveness { get; set; } + + /// + /// Time investment needed to reach projected effectiveness + /// + public Dictionary TimeInvestmentRequired { get; set; } = new(); + + /// + /// When effectiveness was calculated + /// + public DateTime CalculatedAt { get; set; } + + /// + /// Additional effectiveness analysis details + /// + public Dictionary? EffectivenessDetails { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/FraudDetectionResponseDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/FraudDetectionResponseDto.cs new file mode 100644 index 0000000..e788d94 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/FraudDetectionResponseDto.cs @@ -0,0 +1,76 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\FraudDetectionResponseDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Response DTO for fraud detection analysis results + * Last Edit Notes: Individual file implementation for comprehensive fraud detection results with risk scoring and recommendation system + */ + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Response DTO for fraud detection analysis results + /// + public class FraudDetectionResponseDto + { + /// + /// Player being analyzed for fraud + /// + public int PlayerId { get; set; } + + /// + /// Transaction analyzed for fraud indicators + /// + public string TransactionId { get; set; } = string.Empty; + + /// + /// Overall fraud risk score (0-100) + /// + public int FraudRiskScore { get; set; } + + /// + /// Risk classification (Low, Medium, High, Critical) + /// + public string RiskLevel { get; set; } = string.Empty; + + /// + /// Whether transaction should be blocked + /// + public bool RecommendBlock { get; set; } + + /// + /// Specific fraud indicators detected + /// + public List FraudIndicators { get; set; } = new(); + + /// + /// Detailed fraud analysis results + /// + public Dictionary FraudAnalysis { get; set; } = new(); + + /// + /// Historical pattern analysis results + /// + public Dictionary? HistoricalPatterns { get; set; } + + /// + /// Recommended actions based on analysis + /// + public List RecommendedActions { get; set; } = new(); + + /// + /// Confidence level in the fraud assessment (0-100) + /// + public int ConfidenceLevel { get; set; } + + /// + /// When fraud analysis was performed + /// + public DateTime AnalysisTime { get; set; } + + /// + /// Additional fraud detection metadata + /// + public Dictionary? FraudMetadata { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/MonetizationHealthResponseDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/MonetizationHealthResponseDto.cs new file mode 100644 index 0000000..a2b4779 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/MonetizationHealthResponseDto.cs @@ -0,0 +1,96 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\MonetizationHealthResponseDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Response DTO for monetization health monitoring + * Last Edit Notes: Individual file implementation for ethical monetization health monitoring with player protection and spending limit analysis + */ + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Response DTO for monetization health monitoring + /// + public class MonetizationHealthResponseDto + { + /// + /// Player being monitored for monetization health + /// + public int PlayerId { get; set; } + + /// + /// Overall monetization health status (Healthy, Warning, Critical) + /// + public string HealthStatus { get; set; } = string.Empty; + + /// + /// Player's spending behavior classification + /// + public string SpendingBehaviorType { get; set; } = string.Empty; + + /// + /// Total spending amount over monitoring period + /// + public decimal TotalSpending { get; set; } + + /// + /// Spending frequency analysis + /// + public Dictionary SpendingFrequency { get; set; } = new(); + + /// + /// Spending pattern analysis and trends + /// + public Dictionary SpendingPatterns { get; set; } = new(); + + /// + /// Player protection measures currently active + /// + public List ActiveProtections { get; set; } = new(); + + /// + /// Recommended spending limits and controls + /// + public Dictionary RecommendedLimits { get; set; } = new(); + + /// + /// Warning indicators for problematic spending + /// + public List WarningIndicators { get; set; } = new(); + + /// + /// Positive engagement metrics (time played, social interactions) + /// + public Dictionary PositiveEngagement { get; set; } = new(); + + /// + /// Value provided to player vs spending analysis + /// + public Dictionary ValueAnalysis { get; set; } = new(); + + /// + /// Player satisfaction and retention indicators + /// + public Dictionary SatisfactionMetrics { get; set; } = new(); + + /// + /// Ethical monetization compliance score (0-100) + /// + public int EthicalComplianceScore { get; set; } + + /// + /// Recommended actions for maintaining healthy monetization + /// + public List HealthRecommendations { get; set; } = new(); + + /// + /// When health monitoring was performed + /// + public DateTime MonitoredAt { get; set; } + + /// + /// Additional monetization health details + /// + public Dictionary? HealthDetails { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/PurchaseValidationRequestDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/PurchaseValidationRequestDto.cs new file mode 100644 index 0000000..6b796e1 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/PurchaseValidationRequestDto.cs @@ -0,0 +1,72 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\PurchaseValidationRequestDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Request DTO for purchase validation operations + * Last Edit Notes: Individual file implementation for purchase validation input with fraud detection and balance monitoring + */ + +using System.ComponentModel.DataAnnotations; + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Request DTO for purchase validation operations + /// + public class PurchaseValidationRequestDto + { + /// + /// Item or package being validated for purchase + /// + [Required] + [StringLength(100)] + public string ItemId { get; set; } = string.Empty; + + /// + /// Quantity being validated for purchase + /// + [Range(1, int.MaxValue)] + public int Quantity { get; set; } = 1; + + /// + /// Purchase amount to validate + /// + [Range(0.01, double.MaxValue)] + public decimal PurchaseAmount { get; set; } + + /// + /// Currency code for validation + /// + [Required] + [StringLength(3)] + public string CurrencyCode { get; set; } = string.Empty; + + /// + /// External transaction ID for validation + /// + [Required] + [StringLength(200)] + public string TransactionId { get; set; } = string.Empty; + + /// + /// Payment method to validate + /// + [StringLength(50)] + public string? PaymentMethod { get; set; } + + /// + /// Include anti-pay-to-win balance check + /// + public bool IncludeBalanceCheck { get; set; } = true; + + /// + /// Include fraud detection analysis + /// + public bool IncludeFraudDetection { get; set; } = true; + + /// + /// Additional validation parameters + /// + public Dictionary? ValidationParameters { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/RefundRequestDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/RefundRequestDto.cs new file mode 100644 index 0000000..591ea3d --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/RefundRequestDto.cs @@ -0,0 +1,73 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\RefundRequestDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Request DTO for refund processing operations + * Last Edit Notes: Individual file implementation for refund processing with chargeback protection and VIP tier considerations + */ + +using System.ComponentModel.DataAnnotations; + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Request DTO for refund processing operations + /// + public class RefundRequestDto + { + /// + /// Original transaction ID to be refunded + /// + [Required] + [StringLength(200)] + public string OriginalTransactionId { get; set; } = string.Empty; + + /// + /// Reason for the refund request + /// + [Required] + [StringLength(500)] + public string RefundReason { get; set; } = string.Empty; + + /// + /// Refund amount requested + /// + [Range(0.01, double.MaxValue)] + public decimal RefundAmount { get; set; } + + /// + /// Currency code for the refund + /// + [Required] + [StringLength(3)] + public string CurrencyCode { get; set; } = string.Empty; + + /// + /// Refund type (partial, full, chargeback) + /// + [Required] + [StringLength(50)] + public string RefundType { get; set; } = string.Empty; + + /// + /// Whether to adjust VIP progression for refund + /// + public bool AdjustVipProgression { get; set; } = true; + + /// + /// Whether to remove purchased items/benefits + /// + public bool RemovePurchasedItems { get; set; } = true; + + /// + /// External refund reference from payment processor + /// + [StringLength(200)] + public string? ExternalRefundReference { get; set; } + + /// + /// Additional refund processing parameters + /// + public Dictionary? RefundParameters { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/RefundResponseDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/RefundResponseDto.cs new file mode 100644 index 0000000..79767e5 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/RefundResponseDto.cs @@ -0,0 +1,76 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\RefundResponseDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Response DTO for refund processing results + * Last Edit Notes: Individual file implementation for refund processing results with VIP adjustment and item removal tracking + */ + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Response DTO for refund processing results + /// + public class RefundResponseDto + { + /// + /// Whether the refund was successfully processed + /// + public bool IsRefunded { get; set; } + + /// + /// Player receiving the refund + /// + public int PlayerId { get; set; } + + /// + /// Original transaction ID that was refunded + /// + public string OriginalTransactionId { get; set; } = string.Empty; + + /// + /// New refund transaction ID + /// + public string RefundTransactionId { get; set; } = string.Empty; + + /// + /// Amount successfully refunded + /// + public decimal RefundedAmount { get; set; } + + /// + /// Currency of the refund + /// + public string CurrencyCode { get; set; } = string.Empty; + + /// + /// Type of refund processed + /// + public string RefundType { get; set; } = string.Empty; + + /// + /// VIP progression adjustments made + /// + public Dictionary VipAdjustments { get; set; } = new(); + + /// + /// Items/benefits removed due to refund + /// + public List RemovedItems { get; set; } = new(); + + /// + /// External payment processor response + /// + public Dictionary? PaymentProcessorResponse { get; set; } + + /// + /// When the refund was processed + /// + public DateTime ProcessedAt { get; set; } + + /// + /// Additional refund processing details + /// + public Dictionary? RefundDetails { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/SkillAlternativesRequestDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/SkillAlternativesRequestDto.cs new file mode 100644 index 0000000..5cbf8a9 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/SkillAlternativesRequestDto.cs @@ -0,0 +1,70 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\SkillAlternativesRequestDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Request DTO for skill-based alternatives to premium purchases + * Last Edit Notes: Individual file implementation for anti-pay-to-win skill alternatives with achievement-based rewards + */ + +using System.ComponentModel.DataAnnotations; + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Request DTO for skill-based alternatives to premium purchases + /// + public class SkillAlternativesRequestDto + { + /// + /// Premium item or benefit player wants skill alternative for + /// + [Required] + [StringLength(100)] + public string PremiumItemId { get; set; } = string.Empty; + + /// + /// Category of premium benefit (combat, economic, convenience, cosmetic) + /// + [Required] + [StringLength(50)] + public string BenefitCategory { get; set; } = string.Empty; + + /// + /// Player's current skill level in relevant category + /// + [Range(1, 100)] + public int CurrentSkillLevel { get; set; } = 1; + + /// + /// Desired effectiveness percentage (max 70% for F2P balance) + /// + [Range(1, 70)] + public int DesiredEffectiveness { get; set; } = 50; + + /// + /// Time player is willing to invest (hours per day) + /// + [Range(0.5, 24.0)] + public double TimeCommitment { get; set; } = 2.0; + + /// + /// Player's preferred skill challenge types + /// + public List PreferredChallenges { get; set; } = new(); + + /// + /// Whether to include alliance-based skill alternatives + /// + public bool IncludeAllianceAlternatives { get; set; } = true; + + /// + /// Whether to include kingdom event alternatives + /// + public bool IncludeKingdomEventAlternatives { get; set; } = true; + + /// + /// Additional skill alternative parameters + /// + public Dictionary? AlternativeParameters { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/SkillAlternativesResponseDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/SkillAlternativesResponseDto.cs new file mode 100644 index 0000000..e991546 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/SkillAlternativesResponseDto.cs @@ -0,0 +1,81 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\SkillAlternativesResponseDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Response DTO for skill-based alternatives to premium purchases + * Last Edit Notes: Individual file implementation for skill alternatives with achievement paths and effectiveness tracking + */ + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Response DTO for skill-based alternatives to premium purchases + /// + public class SkillAlternativesResponseDto + { + /// + /// Player requesting skill alternatives + /// + public int PlayerId { get; set; } + + /// + /// Premium item being replaced with skill alternatives + /// + public string PremiumItemId { get; set; } = string.Empty; + + /// + /// Maximum effectiveness achievable through skill (typically 70%) + /// + public int MaxSkillEffectiveness { get; set; } + + /// + /// Player's current effectiveness level + /// + public int CurrentEffectiveness { get; set; } + + /// + /// Available skill-based achievement paths + /// + public List> SkillPaths { get; set; } = new(); + + /// + /// Recommended daily activities for skill building + /// + public List> DailyActivities { get; set; } = new(); + + /// + /// Alliance-based skill alternatives available + /// + public List> AllianceAlternatives { get; set; } = new(); + + /// + /// Kingdom event opportunities for skill advancement + /// + public List> KingdomEventOpportunities { get; set; } = new(); + + /// + /// Achievement milestones and rewards + /// + public Dictionary AchievementMilestones { get; set; } = new(); + + /// + /// Estimated time to reach desired effectiveness + /// + public Dictionary TimeEstimates { get; set; } = new(); + + /// + /// Progress tracking for existing skill alternatives + /// + public Dictionary? CurrentProgress { get; set; } + + /// + /// When alternatives were calculated + /// + public DateTime CalculatedAt { get; set; } + + /// + /// Additional skill alternative details + /// + public Dictionary? AlternativeDetails { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipBenefitClaimRequestDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipBenefitClaimRequestDto.cs new file mode 100644 index 0000000..16303c4 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipBenefitClaimRequestDto.cs @@ -0,0 +1,70 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\VipBenefitClaimRequestDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Request DTO for VIP benefit claim operations + * Last Edit Notes: Individual file implementation for VIP benefit claiming with secret tier support and eligibility validation + */ + +using System.ComponentModel.DataAnnotations; + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Request DTO for VIP benefit claim operations + /// + public class VipBenefitClaimRequestDto + { + /// + /// Type of benefit being claimed + /// + [Required] + [StringLength(100)] + public string BenefitType { get; set; } = string.Empty; + + /// + /// Specific benefit identifier + /// + [Required] + [StringLength(100)] + public string BenefitId { get; set; } = string.Empty; + + /// + /// Quantity of benefit to claim + /// + [Range(1, int.MaxValue)] + public int Quantity { get; set; } = 1; + + /// + /// Whether this is a secret tier benefit + /// + public bool IsSecretTierBenefit { get; set; } = false; + + /// + /// Claim frequency type (daily, weekly, monthly, one-time) + /// + [StringLength(50)] + public string? ClaimFrequency { get; set; } + + /// + /// Whether to validate eligibility before claiming + /// + public bool ValidateEligibility { get; set; } = true; + + /// + /// Whether to apply bonus multipliers + /// + public bool ApplyBonusMultipliers { get; set; } = true; + + /// + /// Target resource or item for benefit application + /// + [StringLength(100)] + public string? TargetResource { get; set; } + + /// + /// Additional claim parameters + /// + public Dictionary? ClaimParameters { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipBenefitClaimResponseDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipBenefitClaimResponseDto.cs new file mode 100644 index 0000000..8d5251d --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipBenefitClaimResponseDto.cs @@ -0,0 +1,91 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\VipBenefitClaimResponseDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Response DTO for VIP benefit claim results + * Last Edit Notes: Individual file implementation for VIP benefit claim results with cooldown tracking and multiplier calculations + */ + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Response DTO for VIP benefit claim results + /// + public class VipBenefitClaimResponseDto + { + /// + /// Player who claimed the benefit + /// + public int PlayerId { get; set; } + + /// + /// Type of benefit that was claimed + /// + public string BenefitType { get; set; } = string.Empty; + + /// + /// Specific benefit identifier that was claimed + /// + public string BenefitId { get; set; } = string.Empty; + + /// + /// Whether the claim was successful + /// + public bool ClaimSuccessful { get; set; } + + /// + /// Quantity of benefit successfully claimed + /// + public int ClaimedQuantity { get; set; } + + /// + /// Base benefit value before multipliers + /// + public decimal BaseBenefitValue { get; set; } + + /// + /// Final benefit value after all multipliers + /// + public decimal FinalBenefitValue { get; set; } + + /// + /// Multipliers applied to the benefit + /// + public Dictionary AppliedMultipliers { get; set; } = new(); + + /// + /// Resources or items granted + /// + public Dictionary GrantedResources { get; set; } = new(); + + /// + /// Special items or bonuses granted + /// + public List SpecialBenefitsGranted { get; set; } = new(); + + /// + /// When this benefit can be claimed again + /// + public DateTime? NextClaimAvailable { get; set; } + + /// + /// Remaining claims for this benefit type + /// + public int? RemainingClaims { get; set; } + + /// + /// Whether this was a secret tier benefit + /// + public bool WasSecretTierBenefit { get; set; } + + /// + /// When the benefit was claimed + /// + public DateTime ClaimedAt { get; set; } + + /// + /// Additional claim details and metadata + /// + public Dictionary? ClaimDetails { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipProgressionRequestDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipProgressionRequestDto.cs new file mode 100644 index 0000000..82ad49b --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipProgressionRequestDto.cs @@ -0,0 +1,69 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\VipProgressionRequestDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Request DTO for VIP progression management operations + * Last Edit Notes: Individual file implementation for VIP progression with secret tier support and chargeback protection + */ + +using System.ComponentModel.DataAnnotations; + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Request DTO for VIP progression management operations + /// + public class VipProgressionRequestDto + { + /// + /// Type of VIP progression operation (advance, adjust, recalculate) + /// + [Required] + [StringLength(50)] + public string ProgressionType { get; set; } = string.Empty; + + /// + /// Purchase amount contributing to VIP progression + /// + [Range(0, double.MaxValue)] + public decimal? PurchaseAmount { get; set; } + + /// + /// Target VIP level (for manual adjustments) + /// + [Range(0, 50)] + public int? TargetVipLevel { get; set; } + + /// + /// Whether to include secret tier calculations + /// + public bool IncludeSecretTiers { get; set; } = true; + + /// + /// Whether to apply chargeback protection adjustments + /// + public bool ApplyChargebackProtection { get; set; } = true; + + /// + /// Reason for VIP progression change + /// + [StringLength(200)] + public string? ProgressionReason { get; set; } + + /// + /// External transaction reference + /// + [StringLength(200)] + public string? TransactionReference { get; set; } + + /// + /// Whether to recalculate benefits automatically + /// + public bool RecalculateBenefits { get; set; } = true; + + /// + /// Additional progression parameters + /// + public Dictionary? ProgressionParameters { get; set; } + } +} \ No newline at end of file diff --git a/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipProgressionResponseDto.cs b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipProgressionResponseDto.cs new file mode 100644 index 0000000..a1e2657 --- /dev/null +++ b/ShadowedRealmsMobile/src/server/ShadowedRealms.Shared/DTOs/Purchase/VipProgressionResponseDto.cs @@ -0,0 +1,81 @@ +/* + * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Shared\DTOs\Purchase\VipProgressionResponseDto.cs + * Created: 2025-10-23 + * Last Modified: 2025-10-23 + * Description: Response DTO for VIP progression management results + * Last Edit Notes: Individual file implementation for VIP progression results with secret tier tracking and benefit calculations + */ + +namespace ShadowedRealms.Shared.DTOs.Purchase +{ + /// + /// Response DTO for VIP progression management results + /// + public class VipProgressionResponseDto + { + /// + /// Player whose VIP progression was managed + /// + public int PlayerId { get; set; } + + /// + /// Previous VIP level before progression + /// + public int PreviousVipLevel { get; set; } + + /// + /// New VIP level after progression + /// + public int NewVipLevel { get; set; } + + /// + /// Previous VIP points/spending amount + /// + public decimal PreviousVipPoints { get; set; } + + /// + /// New VIP points/spending amount + /// + public decimal NewVipPoints { get; set; } + + /// + /// Points needed for next VIP level + /// + public decimal PointsToNextLevel { get; set; } + + /// + /// Whether player has access to secret tiers + /// + public bool HasSecretTierAccess { get; set; } + + /// + /// Secret tier level if applicable + /// + public int? SecretTierLevel { get; set; } + + /// + /// New benefits unlocked from progression + /// + public List NewBenefitsUnlocked { get; set; } = new(); + + /// + /// Updated VIP benefit calculations + /// + public Dictionary VipBenefits { get; set; } = new(); + + /// + /// Chargeback protection status + /// + public Dictionary ChargebackProtection { get; set; } = new(); + + /// + /// When the progression was processed + /// + public DateTime ProcessedAt { get; set; } + + /// + /// Additional progression details + /// + public Dictionary? ProgressionDetails { get; set; } + } +} \ No newline at end of file