Bounded Context: Configuration
Aggregate Root: AppConfiguration
Module: Ums.Domain.Configuration.AppConfiguration
Status: Production
The AppConfiguration aggregate represents a single hierarchical configuration entry in UMS. It follows the mandatory corporate code / value / description pattern and can be scoped globally, by tenant, by suite, or by module.
AppConfiguration is a standalone aggregate root. Each configuration row is managed independently.
Code, Value, and Description.TenantId, SystemSuiteId, and ModuleId.Draft.| Entity / VO | Type | Ownership |
|—|—|—|
| AppConfigurationId | Value Object | Aggregate identifier |
| TenantId | Value Object | Optional tenant scope |
| SystemSuiteId | Value Object | Optional suite scope |
| IdValueObject | Value Object | Optional module scope |
| Code | Value Object | Technical key |
| ConfigurationValue | Value Object | Operational value |
| Description | Value Object | Functional meaning |
| ConfigurationScope | Enumeration | Global, Tenant, Suite, Module |
| ConfigStatus | Enumeration | Draft, Published, Archived |
| Event | Trigger |
|—|—|
| AppConfigCreatedEvent | New configuration created |
| AppConfigUpdatedEvent | Draft configuration updated |
| AppConfigPublishedEvent | Configuration published |
| AppConfigArchivedEvent | Configuration archived |
AppConfiguration (Aggregate Root)
└── Props: AppConfigurationProps
├── Id: IdValueObject
├── TenantId?: TenantId
├── SystemSuiteId?: SystemSuiteId
├── ModuleId?: IdValueObject
├── Code: Code
├── Value: ConfigurationValue
├── Description: Description
├── Scope: ConfigurationScope
├── IsInheritable: bool
├── IsEncrypted: bool
├── Version: string
├── Status: ConfigStatus
└── Audit: AuditValueObject
classDiagram
class AppConfiguration {
+Guid Id
+Guid? TenantId
+Guid? SystemSuiteId
+Guid? ModuleId
+Code Code
+ConfigurationValue Value
+Description Description
+ConfigurationScope Scope
+bool IsInheritable
+bool IsEncrypted
+string Version
+ConfigStatus Status
+Create(tenantId, systemSuiteId, moduleId, code, value, description, isInheritable, isEncrypted, actor)
+Update(value, description, actor)
+Publish(actor)
+Archive(actor)
}
sequenceDiagram
participant C as Client
participant H as Handler
participant R as IAppConfigurationRepository
participant A as AppConfiguration (AR)
C->>H: PublishAppConfiguration(configId)
H->>R: GetById(configId)
R-->>H: AppConfiguration
H->>A: Publish(actor)
A->>A: Validate Draft status
A->>A: Raise AppConfigPublishedEvent
H->>R: Update(configuration)
R-->>H: ok
erDiagram
APP_CONFIGURATION {
uniqueidentifier Id PK
uniqueidentifier TenantId FK "Nullable"
uniqueidentifier SystemSuiteId FK "Nullable"
uniqueidentifier ModuleId FK "Nullable"
nvarchar Code
nvarchar Value
nvarchar Description
int ScopeId
bit IsInheritable
bit IsEncrypted
nvarchar Version
int StatusId
nvarchar CreatedBy
datetime2 CreatedAtUtc
nvarchar UpdatedBy
datetime2 UpdatedAtUtc
nvarchar AuditTimeSpan
}
TenantId.IsEncrypted identifies configuration entries that must be handled as sensitive data.Description must explain purpose, impact, expected behavior, and applicable scope.AppConfiguration is modeled as one configuration entry per aggregate, not as an environment sheet containing child parameters.