website refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Represents a user's selected avatar.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { MediaUrl } from '../value-objects/MediaUrl';
|
||||
|
||||
export interface AvatarProps {
|
||||
@@ -15,15 +15,15 @@ export interface AvatarProps {
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
export class Avatar implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class Avatar extends Entity<string> {
|
||||
readonly driverId: string;
|
||||
readonly mediaUrl: MediaUrl;
|
||||
readonly selectedAt: Date;
|
||||
private _isActive: boolean;
|
||||
|
||||
private constructor(props: AvatarProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.driverId = props.driverId;
|
||||
this.mediaUrl = MediaUrl.create(props.mediaUrl);
|
||||
this.selectedAt = props.selectedAt;
|
||||
|
||||
Reference in New Issue
Block a user