Files
DocumentService/DocumentOperator.Domain/Models/ValueObjects/TenantId.cs
TekH 0e88b349d7 Rebrand project: DocumentOperator to DocumentService
This commit implements a complete rebranding of the project:
- Updated all namespaces from `DocumentOperator` to `DocumentService`.
- Renamed file paths, embedded resources, and test data references.
- Updated configuration keys, logging paths, and Redis instance names.
- Revised documentation to reflect the new project name.
- Modified project and solution files to align with the new structure.
- Updated class names, DTOs, commands, queries, and handlers.
- Adjusted middleware, controllers, and API endpoints.
- Updated Swagger metadata and API titles to `DocumentService API`.
- Refactored test namespaces, resource paths, and embedded resources.
- Updated build and deployment configurations for the new name.
- Replaced all references to `DocumentOperator` in comments and literals.

These changes ensure consistency across the codebase and documentation.
2026-07-30 14:02:56 +02:00

41 lines
990 B
C#

namespace DocumentService.Domain.Models.ValueObjects;
public sealed class TenantId
{
public string Value { get; }
private TenantId(string value)
{
Value = value;
}
public static TenantId Create(string value)
{
if (string.IsNullOrWhiteSpace(value))
throw new Common.Exceptions.DomainValidationException("TenantId cannot be empty.");
if (value.Length > 100)
throw new Common.Exceptions.DomainValidationException("TenantId cannot exceed 100 characters.");
// Normalisierung: Lowercase
var normalized = value.Trim().ToLowerInvariant();
return new TenantId(normalized);
}
public override string ToString() => Value;
// Equality
public override bool Equals(object? obj)
{
if (obj is not TenantId other)
return false;
return Value == other.Value;
}
public override int GetHashCode()
{
return Value.GetHashCode();
}
}