website refactor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { AdminDomainInvariantError, AdminDomainValidationError } from '../errors/AdminDomainError';
|
||||
import { Email } from '../value-objects/Email';
|
||||
import { UserId } from '../value-objects/UserId';
|
||||
@@ -17,8 +17,7 @@ export interface AdminUserProps {
|
||||
primaryDriverId: string | undefined;
|
||||
}
|
||||
|
||||
export class AdminUser implements Entity<UserId> {
|
||||
readonly id: UserId;
|
||||
export class AdminUser extends Entity<UserId> {
|
||||
private _email: Email;
|
||||
private _roles: UserRole[];
|
||||
private _status: UserStatus;
|
||||
@@ -29,7 +28,8 @@ export class AdminUser implements Entity<UserId> {
|
||||
private _primaryDriverId: string | undefined;
|
||||
|
||||
private constructor(props: AdminUserProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this._email = props.email;
|
||||
this._roles = props.roles;
|
||||
this._status = props.status;
|
||||
|
||||
Reference in New Issue
Block a user