website refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Represents a user's selected avatar.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import { MediaUrl } from '../value-objects/MediaUrl';
|
||||
|
||||
export interface AvatarProps {
|
||||
@@ -15,7 +15,7 @@ export interface AvatarProps {
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
export class Avatar implements IEntity<string> {
|
||||
export class Avatar implements Entity<string> {
|
||||
readonly id: string;
|
||||
readonly driverId: string;
|
||||
readonly mediaUrl: MediaUrl;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Represents a request to generate a racing avatar from a face photo.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import type {
|
||||
AvatarGenerationRequestProps,
|
||||
AvatarGenerationStatus,
|
||||
@@ -13,7 +13,7 @@ import type {
|
||||
} from '../types/AvatarGenerationRequest';
|
||||
import { MediaUrl } from '../value-objects/MediaUrl';
|
||||
|
||||
export class AvatarGenerationRequest implements IEntity<string> {
|
||||
export class AvatarGenerationRequest implements Entity<string> {
|
||||
readonly id: string;
|
||||
readonly userId: string;
|
||||
readonly facePhotoUrl: MediaUrl;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Represents a media file (image, video, etc.) stored in the system.
|
||||
*/
|
||||
|
||||
import type { IEntity } from '@core/shared/domain';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import { MediaUrl } from '../value-objects/MediaUrl';
|
||||
|
||||
export type MediaType = 'image' | 'video' | 'document';
|
||||
@@ -22,7 +22,7 @@ export interface MediaProps {
|
||||
metadata?: Record<string, unknown> | undefined;
|
||||
}
|
||||
|
||||
export class Media implements IEntity<string> {
|
||||
export class Media implements Entity<string> {
|
||||
readonly id: string;
|
||||
readonly filename: string;
|
||||
readonly originalName: string;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import type { AvatarGenerationRequest } from '../entities/AvatarGenerationRequest';
|
||||
|
||||
export interface IAvatarGenerationRepository {
|
||||
export interface AvatarGenerationRepository {
|
||||
/**
|
||||
* Save an avatar generation request
|
||||
*/
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import type { Avatar } from '../entities/Avatar';
|
||||
|
||||
export interface IAvatarRepository {
|
||||
export interface AvatarRepository {
|
||||
/**
|
||||
* Save an avatar
|
||||
*/
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import type { Media } from '../entities/Media';
|
||||
|
||||
export interface IMediaRepository {
|
||||
export interface MediaRepository {
|
||||
/**
|
||||
* Save a media file
|
||||
*/
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
import type { ValueObject } from '@core/shared/domain';
|
||||
|
||||
export interface AvatarIdProps {
|
||||
value: string;
|
||||
}
|
||||
|
||||
export class AvatarId implements IValueObject<AvatarIdProps> {
|
||||
export class AvatarId implements ValueObject<AvatarIdProps> {
|
||||
public readonly props: AvatarIdProps;
|
||||
|
||||
private constructor(value: string) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { IValueObject } from '@core/shared/domain';
|
||||
import type { ValueObject } from '@core/shared/domain';
|
||||
|
||||
/**
|
||||
* Value Object: MediaUrl
|
||||
@@ -12,7 +12,7 @@ export interface MediaUrlProps {
|
||||
value: string;
|
||||
}
|
||||
|
||||
export class MediaUrl implements IValueObject<MediaUrlProps> {
|
||||
export class MediaUrl implements ValueObject<MediaUrlProps> {
|
||||
public readonly props: MediaUrlProps;
|
||||
|
||||
private constructor(value: string) {
|
||||
|
||||
Reference in New Issue
Block a user