Fix compilation errors: Add IKingdomScoped interface, fix AllianceRepository return types, resolve DTO issues
- Added IKingdomScoped interface implementation to Alliance model - Created missing IKingdomScoped.cs interface file - Fixed all AllianceRepository method return types to match interface - Resolved DTO Range attribute decimal/double conversion error - Reduced compilation errors from 345+ to manageable count
This commit is contained in:
parent
3459d449ce
commit
4ff428898e
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* File: ShadowedRealms.Core/Interfaces/IKingdomScoped.cs
|
||||
* Created: 2025-10-19
|
||||
* Last Modified: 2025-10-19
|
||||
* Description: Interface for entities that are scoped to a specific kingdom, ensuring proper kingdom-based data isolation and security
|
||||
* Last Edit Notes: Initial creation to support Repository<T, K> kingdom scoping requirements
|
||||
*/
|
||||
|
||||
namespace ShadowedRealms.Core.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for entities that belong to a specific kingdom.
|
||||
/// This ensures proper kingdom-based data isolation and security across all repository operations.
|
||||
/// </summary>
|
||||
public interface IKingdomScoped
|
||||
{
|
||||
/// <summary>
|
||||
/// The Kingdom ID that this entity belongs to.
|
||||
/// Used for kingdom-scoped queries and security validation.
|
||||
/// </summary>
|
||||
int KingdomId { get; set; }
|
||||
}
|
||||
}
|
||||
@ -3,16 +3,17 @@
|
||||
* Created: 2025-10-19
|
||||
* Last Modified: 2025-10-19
|
||||
* Description: Core Alliance entity representing player organizations with territory, research, and coalition systems. Handles alliance hierarchy, progression, and KvK participation while preserving alliance independence.
|
||||
* Last Edit Notes: Initial creation with 5-tier hierarchy, research trees, territory system, and coalition mechanics for KvK events
|
||||
* Last Edit Notes: Added IKingdomScoped interface implementation to resolve Repository compatibility
|
||||
*/
|
||||
|
||||
using ShadowedRealms.Core.Interfaces;
|
||||
using ShadowedRealms.Core.Models.Kingdom;
|
||||
using ShadowedRealms.Core.Models.Player;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ShadowedRealms.Core.Models.Alliance
|
||||
{
|
||||
public class Alliance
|
||||
public class Alliance : IKingdomScoped
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
* 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
|
||||
* Last Edit Notes: Fixed Range attribute to use double instead of decimal.MaxValue
|
||||
*/
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@ -25,7 +25,7 @@ namespace ShadowedRealms.Shared.DTOs.Player
|
||||
/// <summary>
|
||||
/// Amount of experience to process
|
||||
/// </summary>
|
||||
[Range(0, decimal.MaxValue)]
|
||||
[Range(0.0, double.MaxValue)]
|
||||
public decimal ExperienceAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user