package vo

// MigrationCheck is one independently reportable migration precheck or
// comparison result.
type MigrationCheck struct {
	Name    string
	Passed  bool
	Message string
}

// ChangefeedMigrationPrecheck is a read-only assessment of whether a legacy
// changefeed can be migrated to the new architecture.
type ChangefeedMigrationPrecheck struct {
	Passed               bool
	Checks               []MigrationCheck
	SourceArch           string
	SourceState          string
	CurrentCheckpointTSO uint64
	TargetRCU            uint32
	TargetProvider       string
	TargetRegion         string
	TargetKubernetes     string
}

// ChangefeedMigrationResult identifies both sides of a migration. No separate
// migration record is persisted; operators use these identifiers for compare,
// finalize, and rollback commands.
type ChangefeedMigrationResult struct {
	SourceChangefeedID  string
	Target              *Changefeed
	SourceCheckpointTSO uint64
}

// ChangefeedComparison contains the redacted semantic comparison of the
// effective kernel configurations.
type ChangefeedComparison struct {
	Passed              bool
	Checks              []MigrationCheck
	SourceCheckpointTSO uint64
	TargetStartTSO      uint64
	TargetCheckpointTSO uint64
	SourceState         string
	TargetState         string
}
