website refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Represents a media file (image, video, etc.) stored in the system.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { MediaUrl } from '../value-objects/MediaUrl';
|
||||
|
||||
export type MediaType = 'image' | 'video' | 'document';
|
||||
@@ -22,8 +22,7 @@ export interface MediaProps {
|
||||
metadata?: Record<string, unknown> | undefined;
|
||||
}
|
||||
|
||||
export class Media implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class Media extends Entity<string> {
|
||||
readonly filename: string;
|
||||
readonly originalName: string;
|
||||
readonly mimeType: string;
|
||||
@@ -35,7 +34,8 @@ export class Media implements Entity<string> {
|
||||
readonly metadata?: Record<string, unknown> | undefined;
|
||||
|
||||
private constructor(props: MediaProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.filename = props.filename;
|
||||
this.originalName = props.originalName;
|
||||
this.mimeType = props.mimeType;
|
||||
|
||||
Reference in New Issue
Block a user