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

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

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