This commit is contained in:
2025-12-11 13:50:38 +01:00
parent e4c1be628d
commit c7e5de40d6
212 changed files with 2965 additions and 763 deletions

View File

@@ -0,0 +1,3 @@
export interface IEntity<Id = string> {
readonly id: Id;
}

View File

@@ -0,0 +1,24 @@
import type { Result } from '../result/Result';
import type { IDomainError } from '../errors/DomainError';
export interface IDomainService {
readonly serviceName?: string;
}
export interface IDomainCalculationService<Input, Output> extends IDomainService {
calculate(input: Input): Output;
}
export interface IResultDomainCalculationService<Input, Output, Error = IDomainError>
extends IDomainService {
calculate(input: Input): Result<Output, Error>;
}
export interface IDomainValidationService<Input, Output, Error = IDomainError>
extends IDomainService {
validate(input: Input): Result<Output, Error>;
}
export interface IDomainFactoryService<Input, Output> extends IDomainService {
create(input: Input): Output;
}

View File

@@ -0,0 +1,4 @@
export interface IValueObject<Props> {
readonly props: Props;
equals(other: IValueObject<Props>): boolean;
}

View File

@@ -0,0 +1,3 @@
export * from './Entity';
export * from './ValueObject';
export * from './Service';