using CsvHelper.Configuration.Attributes;
using static HorseRacingPredictor.Manager.FileReader;

namespace HorseRacingPredictor.Horses
{
    public class HorseRaceData
    {
        // Informazioni principali sul cavallo
        [Name("Num")]
        public string Num { get; set; }

        [Name("Horse Name")]
        public string HorseName { get; set; }

        [Name("Age")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? Age { get; set; }

        [Name("Gender")]
        public string Gender { get; set; }

        [Name("Handicap Rating")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? HandicapRating { get; set; }

        // Statistiche di carriera
        [Name("Career Runs")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? CareerRuns { get; set; }

        [Name("Career Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? CareerWins { get; set; }

        [Name("Career Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? CareerStrikeRate { get; set; }

        [Name("Career ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? CareerROI { get; set; }

        [Name("Career Placings")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? CareerPlacings { get; set; }

        [Name("Career Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? CareerPlaceStrikeRate { get; set; }

        // Statistiche su pista secca
        [Name("Dry Track Runs")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? DryTrackRuns { get; set; }

        [Name("Dry Track Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? DryTrackWins { get; set; }

        [Name("Dry Track Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? DryTrackStrikeRate { get; set; }

        [Name("Dry Track ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? DryTrackROI { get; set; }

        // Statistiche su pista bagnata
        [Name("Wet Track Runs")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? WetTrackRuns { get; set; }

        [Name("Wet Track Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? WetTrackWins { get; set; }

        [Name("Wet Track Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? WetTrackStrikeRate { get; set; }

        [Name("Wet Track ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? WetTrackROI { get; set; }

        // Statistiche sui premi
        [Name("Average Prize Money")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? AveragePrizeMoney { get; set; }

        [Name("Career Prize Money")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? CareerPrizeMoney { get; set; }

        // Quote e pesi
        [Name("Best Fixed Odds")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? BestFixedOdds { get; set; }

        [Name("BetEasy Odds")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? BetEasyOdds { get; set; }

        [Name("Weight")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Weight { get; set; }

        [Name("Weight Carried")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? WeightCarried { get; set; }

        [Name("Barrier")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? Barrier { get; set; }

        [Name("Prize Money")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? PrizeMoney { get; set; }

        // Statistiche sulla pista attuale
        [Name("This Track Runs")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisTrackRuns { get; set; }

        [Name("This Track Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisTrackWins { get; set; }

        [Name("This Track Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisTrackStrikeRate { get; set; }

        [Name("This Track ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisTrackROI { get; set; }

        [Name("This Track Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisTrackPlaces { get; set; }

        [Name("This Track Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisTrackPlaceStrikeRate { get; set; }

        // Statistiche sulla distanza
        [Name("This Distance Runs")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisDistanceRuns { get; set; }

        [Name("This Distance Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisDistanceWins { get; set; }

        [Name("This Distance Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisDistanceStrikeRate { get; set; }

        [Name("This Distance ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisDistanceROI { get; set; }

        [Name("This Distance Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisDistancePlaces { get; set; }

        [Name("This Distance Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisDistancePlaceStrikeRate { get; set; }

        // Statistiche sulla combinazione pista-distanza
        [Name("This Track Distance Runs")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisTrackDistanceRuns { get; set; }

        [Name("This Track Distance Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisTrackDistanceWins { get; set; }

        [Name("This Track Distance Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisTrackDistanceStrikeRate { get; set; }

        [Name("This Track Distance ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisTrackDistanceROI { get; set; }

        [Name("This Track Distance Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisTrackDistancePlaces { get; set; }

        [Name("This Track Distance Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisTrackDistancePlaceStrikeRate { get; set; }

        // Statistiche sulle condizioni
        [Name("This Condition Runs")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisConditionRuns { get; set; }

        [Name("This Condition Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisConditionWins { get; set; }

        [Name("This Condition Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisConditionStrikeRate { get; set; }

        [Name("This Condition ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisConditionROI { get; set; }

        [Name("This Condition Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? ThisConditionPlaces { get; set; }

        [Name("This Condition Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? ThisConditionPlaceStrikeRate { get; set; }

        // Informazioni sul fantino
        [Name("Jockey")]
        public string Jockey { get; set; }

        [Name("Apprentice")]
        public string Apprentice { get; set; }

        [Name("Jockey Weight Claim")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyWeightClaim { get; set; }

        // Statistiche fantino - ultimi 100
        [Name("Jockey Last 100 Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLast100HorseEarnings { get; set; }

        [Name("Jockey Last 100 Avg Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLast100AvgHorseEarnings { get; set; }

        [Name("Jockey Last 100 Starts")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? JockeyLast100Starts { get; set; }

        [Name("Jockey Last 100 Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? JockeyLast100Wins { get; set; }

        [Name("Jockey Last 100 Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLast100StrikeRate { get; set; }

        [Name("Jockey Last 100 ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLast100ROI { get; set; }

        [Name("Jockey Last 100 Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? JockeyLast100Places { get; set; }

        [Name("Jockey Last 100 Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLast100PlaceStrikeRate { get; set; }

        // Statistiche fantino - ultimi 12 mesi
        [Name("Jockey 12 Month Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Jockey12MonthHorseEarnings { get; set; }

        [Name("Jockey 12 Month Avg Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Jockey12MonthAvgHorseEarnings { get; set; }

        [Name("Jockey 12 Months Starts")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? Jockey12MonthsStarts { get; set; }

        [Name("Jockey 12 Months Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? Jockey12MonthsWins { get; set; }

        [Name("Jockey 12 Months Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Jockey12MonthsStrikeRate { get; set; }

        [Name("Jockey 12 Months ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Jockey12MonthsROI { get; set; }

        [Name("Jockey 12 Months Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? Jockey12MonthsPlaces { get; set; }

        [Name("Jockey 12 Months Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Jockey12MonthsPlaceStrikeRate { get; set; }

        // Statistiche fantino - stagione corrente
        [Name("Jockey This Season Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyThisSeasonHorseEarnings { get; set; }

        [Name("Jockey This Season Avg Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyThisSeasonAvgHorseEarnings { get; set; }

        [Name("Jockey This Season Starts")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? JockeyThisSeasonStarts { get; set; }

        [Name("Jockey This Season Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? JockeyThisSeasonWins { get; set; }

        [Name("Jockey This Season Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyThisSeasonStrikeRate { get; set; }

        [Name("Jockey This Season ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyThisSeasonROI { get; set; }

        [Name("Jockey This Season Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? JockeyThisSeasonPlaces { get; set; }

        [Name("Jockey This Season Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyThisSeasonPlaceStrikeRate { get; set; }

        // Statistiche fantino - stagione precedente
        [Name("Jockey Last Season Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLastSeasonHorseEarnings { get; set; }

        [Name("Jockey Last Season Avg Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLastSeasonAvgHorseEarnings { get; set; }

        [Name("Jockey Last Season Starts")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? JockeyLastSeasonStarts { get; set; }

        [Name("Jockey Last Season Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? JockeyLastSeasonWins { get; set; }

        [Name("Jockey Last Season Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLastSeasonStrikeRate { get; set; }

        [Name("Jockey Last Season ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLastSeasonROI { get; set; }

        [Name("Jockey Last Season Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? JockeyLastSeasonPlaces { get; set; }

        [Name("Jockey Last Season Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? JockeyLastSeasonPlaceStrikeRate { get; set; }

        // Informazioni sull'allenatore
        [Name("Trainer")]
        public string Trainer { get; set; }

        // Statistiche allenatore - ultimi 100
        [Name("Trainer Last 100 Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLast100HorseEarnings { get; set; }

        [Name("Trainer Last 100 Avg Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLast100AvgHorseEarnings { get; set; }

        [Name("Trainer Last 100 Starts")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? TrainerLast100Starts { get; set; }

        [Name("Trainer Last 100 Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? TrainerLast100Wins { get; set; }

        [Name("Trainer Last 100 Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLast100StrikeRate { get; set; }

        [Name("Trainer Last 100 ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLast100ROI { get; set; }

        [Name("Trainer Last 100 Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? TrainerLast100Places { get; set; }

        [Name("Trainer Last 100 Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLast100PlaceStrikeRate { get; set; }

        // Statistiche allenatore - ultimi 12 mesi
        [Name("Trainer 12 Month Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Trainer12MonthHorseEarnings { get; set; }

        [Name("Trainer 12 Month Avg Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Trainer12MonthAvgHorseEarnings { get; set; }

        [Name("Trainer 12 Months Starts")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? Trainer12MonthsStarts { get; set; }

        [Name("Trainer 12 Months Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? Trainer12MonthsWins { get; set; }

        [Name("Trainer 12 Months Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Trainer12MonthsStrikeRate { get; set; }

        [Name("Trainer 12 Months ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Trainer12MonthsROI { get; set; }

        [Name("Trainer 12 Months Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? Trainer12MonthsPlaces { get; set; }

        [Name("Trainer 12 Months Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? Trainer12MonthsPlaceStrikeRate { get; set; }

        // Statistiche allenatore - stagione corrente
        [Name("Trainer This Season Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerThisSeasonHorseEarnings { get; set; }

        [Name("Trainer This Season Avg Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerThisSeasonAvgHorseEarnings { get; set; }

        [Name("Trainer This Season Starts")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? TrainerThisSeasonStarts { get; set; }

        [Name("Trainer This Season Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? TrainerThisSeasonWins { get; set; }

        [Name("Trainer This Season Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerThisSeasonStrikeRate { get; set; }

        [Name("Trainer This Season ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerThisSeasonROI { get; set; }

        [Name("Trainer This Season Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? TrainerThisSeasonPlaces { get; set; }

        [Name("Trainer This Season Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerThisSeasonPlaceStrikeRate { get; set; }

        // Statistiche allenatore - stagione precedente
        [Name("Trainer Last Season Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLastSeasonHorseEarnings { get; set; }

        [Name("Trainer Last Season Avg Horse Earnings")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLastSeasonAvgHorseEarnings { get; set; }

        [Name("Trainer Last Season Starts")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? TrainerLastSeasonStarts { get; set; }

        [Name("Trainer Last Season Wins")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? TrainerLastSeasonWins { get; set; }

        [Name("Trainer Last Season Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLastSeasonStrikeRate { get; set; }

        [Name("Trainer Last Season ROI")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLastSeasonROI { get; set; }

        [Name("Trainer Last Season Places")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? TrainerLastSeasonPlaces { get; set; }

        [Name("Trainer Last Season Place Strike Rate")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? TrainerLastSeasonPlaceStrikeRate { get; set; }

        // Informazioni ultima corsa
        [Name("Last Start Finish Position")]
        [TypeConverter(typeof(NullableIntConverter))]
        public int? LastStartFinishPosition { get; set; }

        [Name("Last Start Margin")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? LastStartMargin { get; set; }

        [Name("Last Start Distance")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? LastStartDistance { get; set; }

        [Name("Last Start Distance Change")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? LastStartDistanceChange { get; set; }

        [Name("Last Start Prize Money")]
        [TypeConverter(typeof(NullableDecimalConverter))]
        public decimal? LastStartPrizeMoney { get; set; }

        // Link e URL
        [Name("Form Guide Url")]
        public string FormGuideUrl { get; set; }

        [Name("Horse Profile Url")]
        public string HorseProfileUrl { get; set; }

        [Name("Jockey Profile Url")]
        public string JockeyProfileUrl { get; set; }

        [Name("Trainer Profile Url")]
        public string TrainerProfileUrl { get; set; }

        // Risultato finale (aggiornato dopo la corsa)
        [Name("Finish Result (Updates after race)")]
        public string FinishResult { get; set; }
    }
}
