ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.usecases.TransferTaskToInProgressUseCase Maven / Gradle / Ivy
package ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.usecases;
import com.rcore.domain.commons.usecase.UseCase;
import com.rcore.domain.commons.usecase.model.VoidOutputValues;
import lombok.RequiredArgsConstructor;
import lombok.Value;
import ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.entity.ConfirmationCodeSendingTaskEntity;
import ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.port.ConfirmationCodeSendingTaskRepository;
@RequiredArgsConstructor
public class TransferTaskToInProgressUseCase extends UseCase {
private final ConfirmationCodeSendingTaskRepository repository;
@Override
public VoidOutputValues execute(InputValues inputValues) {
inputValues.task.inProgress();
repository.save(inputValues.getTask());
return new VoidOutputValues();
}
@Value(staticConstructor = "of")
public static class InputValues implements UseCase.InputValues {
ConfirmationCodeSendingTaskEntity task;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy