module cleanup
This commit is contained in:
34
core/media/domain/repositories/IAvatarRepository.ts
Normal file
34
core/media/domain/repositories/IAvatarRepository.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Repository Interface: IAvatarRepository
|
||||
*
|
||||
* Defines the contract for avatar persistence.
|
||||
*/
|
||||
|
||||
import type { Avatar } from '../entities/Avatar';
|
||||
|
||||
export interface IAvatarRepository {
|
||||
/**
|
||||
* Save an avatar
|
||||
*/
|
||||
save(avatar: Avatar): Promise<void>;
|
||||
|
||||
/**
|
||||
* Find avatar by ID
|
||||
*/
|
||||
findById(id: string): Promise<Avatar | null>;
|
||||
|
||||
/**
|
||||
* Find active avatar for a driver
|
||||
*/
|
||||
findActiveByDriverId(driverId: string): Promise<Avatar | null>;
|
||||
|
||||
/**
|
||||
* Find all avatars for a driver
|
||||
*/
|
||||
findByDriverId(driverId: string): Promise<Avatar[]>;
|
||||
|
||||
/**
|
||||
* Delete an avatar
|
||||
*/
|
||||
delete(id: string): Promise<void>;
|
||||
}
|
||||
29
core/media/domain/repositories/IMediaRepository.ts
Normal file
29
core/media/domain/repositories/IMediaRepository.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Repository Interface: IMediaRepository
|
||||
*
|
||||
* Defines the contract for media file persistence.
|
||||
*/
|
||||
|
||||
import type { Media } from '../entities/Media';
|
||||
|
||||
export interface IMediaRepository {
|
||||
/**
|
||||
* Save a media file
|
||||
*/
|
||||
save(media: Media): Promise<void>;
|
||||
|
||||
/**
|
||||
* Find a media file by ID
|
||||
*/
|
||||
findById(id: string): Promise<Media | null>;
|
||||
|
||||
/**
|
||||
* Find media files by uploader
|
||||
*/
|
||||
findByUploadedBy(uploadedBy: string): Promise<Media[]>;
|
||||
|
||||
/**
|
||||
* Delete a media file
|
||||
*/
|
||||
delete(id: string): Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user