import 'package:injectable/injectable.dart';
import '../entities/type_reference_entity.dart';
import '../repositories/org_types_repository.dart';

@injectable
class UpdateOrgType {
  final IOrgTypesRepository _repository;
  const UpdateOrgType(this._repository);

  Future<TypeReferenceEntity> call({
    required String id,
    required String code,
    required String libelle,
    String? description,
    String? couleur,
    int ordreAffichage = 0,
  }) => _repository.updateOrgType(
    id: id,
    code: code,
    libelle: libelle,
    description: description,
    couleur: couleur,
    ordreAffichage: ordreAffichage,
  );
}
