f6fa070067
Implemented complete CQRS pattern for System Configuration management:
Commands:
- SetConfigurationValueCommand: Create or update configurations with history tracking
- DeactivateConfigurationCommand: Deactivate configurations with audit trail
Queries:
- GetConfigurationByKeyQuery: Retrieve configuration by Scope and Key
- GetAllConfigurationsQuery: List all configurations with filters and pagination
- GetConfigurationHistoryQuery: View complete audit history for any configuration
Features:
- All commands include FluentValidation validators
- History recording to SystemConfigurationHistory table
- Pagination support for list queries
- DTOs for clean data transfer
- Null-safe implementations
Updated:
- IApplicationDbContext: Added 11 new DbSets for network-club entities
- GlobalUsings: Added new entity namespaces
Build Status: ✅ Success (0 errors, 184 warnings in legacy code)
18 lines
487 B
C#
18 lines
487 B
C#
namespace CMSMicroservice.Application.ConfigurationCQ.Commands.DeactivateConfiguration;
|
|
|
|
/// <summary>
|
|
/// Command برای غیرفعال کردن یک Configuration
|
|
/// </summary>
|
|
public record DeactivateConfigurationCommand : IRequest<Unit>
|
|
{
|
|
/// <summary>
|
|
/// شناسه Configuration
|
|
/// </summary>
|
|
public long ConfigurationId { get; init; }
|
|
|
|
/// <summary>
|
|
/// دلیل غیرفعالسازی
|
|
/// </summary>
|
|
public string? Reason { get; init; }
|
|
}
|