38 lines
950 B
Java
38 lines
950 B
Java
package com.quantai.trader.domain;
|
|
|
|
import com.quantai.trader.enums.TraderRunMode;
|
|
import com.quantai.trader.enums.TraderState;
|
|
|
|
import java.time.Instant;
|
|
|
|
public record TraderDecisionCycle(
|
|
String runId,
|
|
String cycleId,
|
|
String snapshotId,
|
|
String symbol,
|
|
String playbookId,
|
|
String playbookVersion,
|
|
TraderState state,
|
|
Instant cycleTime,
|
|
TraderRunMode runMode,
|
|
String decisionStatus,
|
|
String blocker
|
|
) {
|
|
|
|
public TraderDecisionCycle withState(TraderState nextState, String nextStatus, String nextBlocker) {
|
|
return new TraderDecisionCycle(
|
|
runId,
|
|
cycleId,
|
|
snapshotId,
|
|
symbol,
|
|
playbookId,
|
|
playbookVersion,
|
|
nextState,
|
|
cycleTime,
|
|
runMode,
|
|
nextStatus,
|
|
nextBlocker
|
|
);
|
|
}
|
|
}
|