using SVSim.Database.Enums;
namespace SVSim.Database.Models.Config;
///
/// The 3-round bracket schedule for an active Colosseum season — and the per-round
/// reward bundles paid out by /finish + /retire. Empty
/// is the default shipped state — lobby /event_info renders a benign payload with
/// no rounds active. Collection default is in per
/// feedback_config_defaults (property-initializer collection defaults silently empty out
/// under the tier merge).
///
[ConfigSection("ColosseumRounds")]
public class ColosseumRoundsConfig
{
public List Rounds { get; set; } = new();
/// Champion-only reward bundle, paid alongside the final round's FinishRewards
/// when ColosseumProgressionService determines the viewer cleared the bracket.
public List ChampionRewards { get; set; } = new();
public static ColosseumRoundsConfig ShippedDefaults() => new()
{
Rounds = new(),
ChampionRewards = new(),
};
public class RoundEntry
{
/// 1, 2, or 3 in the canonical 3-round schedule.
public int RoundId { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
/// Bracket groups within the round (e.g. distinct breakthrough thresholds
/// for late-joiners). The first entry is the canonical lookup used by
/// ColosseumProgressionService for the v1 single-bracket case.
public List Groups { get; set; } = new();
/// Paid by /finish when the viewer clears or otherwise ends this round
/// successfully. Empty = no bonus for this round.
public List FinishRewards { get; set; } = new();
/// Paid by /retire when the viewer abandons mid-round. Client ignores
/// these once run.RoundId >= FinalB, but server still emits them per
/// retire.md (log completeness).
public List RetireRewards { get; set; } = new();
}
public class GroupEntry
{
public string Group { get; set; } = "";
/// Max battles a viewer can play in this round before bracket termination.
public int MaxBattleCount { get; set; }
/// Wins required to promote out of this round.
public int BreakthroughNumber { get; set; }
/// Total bracket entries allotted to this group.
public int EntryNumber { get; set; }
}
public class RewardEntry
{
public UserGoodsType Type { get; set; }
public long DetailId { get; set; }
public int Count { get; set; }
/// Display name for the rewards[] receipt block. Defaults to empty;
/// client uses system-text lookups when blank.
public string Name { get; set; } = "";
}
}