mirror of
https://github.com/immich-app/immich
synced 2026-08-29 13:15:45 +00:00
refactor: migrate activity repo to kysely (#15203)
Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
parent
2e12c46980
commit
1fb2b3f899
4 changed files with 95 additions and 136 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { Insertable } from 'kysely';
|
||||
import { Activity } from 'src/db';
|
||||
import { ActivityEntity } from 'src/entities/activity.entity';
|
||||
import { ActivitySearch } from 'src/repositories/activity.repository';
|
||||
|
||||
|
|
@ -5,7 +7,7 @@ export const IActivityRepository = 'IActivityRepository';
|
|||
|
||||
export interface IActivityRepository {
|
||||
search(options: ActivitySearch): Promise<ActivityEntity[]>;
|
||||
create(activity: Partial<ActivityEntity>): Promise<ActivityEntity>;
|
||||
create(activity: Insertable<Activity>): Promise<ActivityEntity>;
|
||||
delete(id: string): Promise<void>;
|
||||
getStatistics(assetId: string | undefined, albumId: string): Promise<number>;
|
||||
getStatistics(options: { albumId: string; assetId?: string }): Promise<number>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue