import 'package:dartz/dartz.dart';
import '../../repositories/model_repository.dart';
import '../../../data/models/model/model_dto.dart';
import '../../../core/errors/failures.dart';
import '../base_usecase.dart';

/// 제조사별 모델 조회 UseCase
class GetModelsByVendorUseCase extends UseCase<List<ModelDto>, int> {
  final ModelRepository _modelRepository;

  GetModelsByVendorUseCase(this._modelRepository);

  @override
  Future<Either<Failure, List<ModelDto>>> call(int vendorId) async {
    return await _modelRepository.getModelsByVendor(vendorId);
  }
}