mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 01:11:16 +03:00
refactor: migrate memory repository (#15532)
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import { Insertable, Updateable } from 'kysely';
|
||||
import { Memories } from 'src/db';
|
||||
import { MemoryEntity, OnThisDayData } from 'src/entities/memory.entity';
|
||||
import { IBulkAsset } from 'src/utils/asset.util';
|
||||
|
||||
export const IMemoryRepository = 'IMemoryRepository';
|
||||
|
||||
export interface IMemoryRepository extends IBulkAsset {
|
||||
search(ownerId: string): Promise<MemoryEntity[]>;
|
||||
get(id: string): Promise<MemoryEntity | undefined>;
|
||||
create(
|
||||
memory: Omit<Insertable<Memories>, 'data'> & { data: OnThisDayData },
|
||||
assetIds: Set<string>,
|
||||
): Promise<MemoryEntity>;
|
||||
update(id: string, memory: Updateable<Memories>): Promise<MemoryEntity>;
|
||||
delete(id: string): Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user