mirror of
https://gitlab.com/mobicoop/v3/service/user.git
synced 2026-02-01 22:40:45 +00:00
fix user id
This commit is contained in:
@@ -12,7 +12,6 @@ export class UserEntity extends AggregateRoot<UserProps> {
|
|||||||
const id = create.id ?? v4();
|
const id = create.id ?? v4();
|
||||||
const props: UserProps = { ...create };
|
const props: UserProps = { ...create };
|
||||||
const user = new UserEntity({ id, props });
|
const user = new UserEntity({ id, props });
|
||||||
|
|
||||||
user.addEvent(
|
user.addEvent(
|
||||||
new UserCreatedDomainEvent({
|
new UserCreatedDomainEvent({
|
||||||
aggregateId: id,
|
aggregateId: id,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export class UserMapper
|
|||||||
toPersistence = (entity: UserEntity): UserWriteModel => {
|
toPersistence = (entity: UserEntity): UserWriteModel => {
|
||||||
const copy = entity.getProps();
|
const copy = entity.getProps();
|
||||||
const record: UserWriteModel = {
|
const record: UserWriteModel = {
|
||||||
uuid: copy.id,
|
uuid: entity.id,
|
||||||
firstName: copy.firstName,
|
firstName: copy.firstName,
|
||||||
lastName: copy.lastName,
|
lastName: copy.lastName,
|
||||||
email: copy.email,
|
email: copy.email,
|
||||||
|
|||||||
Reference in New Issue
Block a user