13 lines
470 B
TypeScript
13 lines
470 B
TypeScript
import { UserLevelProgress } from '../entities/user-level-progress.entity';
|
|
|
|
export interface IUserLevelProgressRepository {
|
|
findByUserId(userId: string): Promise<UserLevelProgress[]>;
|
|
countByUserId(userId: string): Promise<number>;
|
|
findByUserAndLevel(
|
|
userId: string,
|
|
levelId: string,
|
|
): Promise<UserLevelProgress | null>;
|
|
create(data: Partial<UserLevelProgress>): UserLevelProgress;
|
|
save(progress: UserLevelProgress): Promise<UserLevelProgress>;
|
|
}
|