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 CreateModelUseCase extends UseCase<ModelDto, CreateModelRequest> {
  final ModelRepository _modelRepository;

  CreateModelUseCase(this._modelRepository);

  @override
  Future<Either<Failure, ModelDto>> call(CreateModelRequest request) async {
    return await _modelRepository.createModel(request);
  }
}