dhtdgh
🧩 Syntax:
export class User extends AggregateRoot {
constructor(
public readonly id: UuidVO,
public name: NameVO,
public lastname: NameVO,
public email: EmailVO,
public password: PasswordVO
) {
super(id)
}
public toPrimitives(): Primitives<User> {
return {
id: this.id.value,
name: this.name.value,
lastname: this.lastname.value,
email: this.email.value,
password: this.password.value,
}
}
}