import { IntersectionType, PartialType, PickType } from '@nestjs/swagger';
import { CoursesVideosProgress } from './courses-progress.entity';
import { CoursesEnrollments } from '../enrollments/courses-enrollments.entity';

export class CreateEnrollmentDto extends IntersectionType(
  PickType(CoursesEnrollments, ['crsId', 'memId']),
) {}

export class UpsertVideoProgressDto extends IntersectionType(
  PickType(CoursesVideosProgress, ['crvId', 'crvpIsCompleted', 'memId']),
  PartialType(PickType(CoursesVideosProgress, ['crvpLastWatchedSeconds'])),
) {}
