ru.foodtechlab.lib.auth.service.domain.migration.usecases.InitMigrationUseCase Maven / Gradle / Ivy
package ru.foodtechlab.lib.auth.service.domain.migration.usecases;
import com.rcore.domain.commons.usecase.UseCase;
import com.rcore.domain.commons.usecase.model.SingletonEntityOutputValues;
import lombok.*;
import ru.foodtechlab.lib.auth.service.domain.migration.entity.MigrationEntity;
import ru.foodtechlab.lib.auth.service.domain.migration.exceptions.MigrationNotFoundException;
import ru.foodtechlab.lib.auth.service.domain.migration.port.MigrationRepository;
import javax.validation.constraints.NotBlank;
/**
* Обновление сущности
*/
@RequiredArgsConstructor
public class InitMigrationUseCase extends UseCase> {
private final MigrationRepository migrationRepository;
@Override
public SingletonEntityOutputValues execute(InputValues inputValues) {
MigrationEntity migrationEntity = migrationRepository.getMigration();
return SingletonEntityOutputValues.of(migrationEntity);
}
@AllArgsConstructor(staticName = "of")
@Getter
@Builder
public static class InputValues implements UseCase.InputValues {
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy