diff --git a/src/modules/user/core/domain/user.entity.ts b/src/modules/user/core/domain/user.entity.ts index 3eb77b2..8978789 100644 --- a/src/modules/user/core/domain/user.entity.ts +++ b/src/modules/user/core/domain/user.entity.ts @@ -12,7 +12,6 @@ export class UserEntity extends AggregateRoot { const id = create.id ?? v4(); const props: UserProps = { ...create }; const user = new UserEntity({ id, props }); - user.addEvent( new UserCreatedDomainEvent({ aggregateId: id, diff --git a/src/modules/user/user.mapper.ts b/src/modules/user/user.mapper.ts index ae6f848..a3ace04 100644 --- a/src/modules/user/user.mapper.ts +++ b/src/modules/user/user.mapper.ts @@ -21,7 +21,7 @@ export class UserMapper toPersistence = (entity: UserEntity): UserWriteModel => { const copy = entity.getProps(); const record: UserWriteModel = { - uuid: copy.id, + uuid: entity.id, firstName: copy.firstName, lastName: copy.lastName, email: copy.email,