refactor to adapters

This commit is contained in:
2025-12-15 18:34:20 +01:00
parent fc671482c8
commit c817d76092
145 changed files with 906 additions and 361 deletions

View File

@@ -1,3 +1,4 @@
import { v4 as uuidv4 } from 'uuid';
import type { IValueObject } from '@gridpilot/shared/domain';
export interface UserIdProps {
@@ -14,6 +15,10 @@ export class UserId implements IValueObject<UserIdProps> {
this.props = { value };
}
public static create(): UserId {
return new UserId(uuidv4());
}
public static fromString(value: string): UserId {
return new UserId(value);
}