// using System; using Marathon.Infrastructure.Persistence; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace Marathon.Infrastructure.Migrations { [DbContext(typeof(MarathonDbContext))] partial class MarathonDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "8.0.12"); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.AnomalyEntity", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("DetectedAt") .IsRequired() .HasColumnType("TEXT"); b.Property("EventCode") .IsRequired() .HasColumnType("TEXT"); b.Property("EvidenceJson") .IsRequired() .HasColumnType("TEXT"); b.Property("Kind") .HasColumnType("INTEGER"); b.Property("Score") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("EventCode") .HasDatabaseName("IX_Anomalies_EventCode"); b.ToTable("Anomalies", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.BetEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("PeriodNumber") .HasColumnType("INTEGER"); b.Property("Rate") .HasColumnType("TEXT"); b.Property("Scope") .HasColumnType("INTEGER"); b.Property("Side") .HasColumnType("INTEGER"); b.Property("SnapshotId") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("SnapshotId") .HasDatabaseName("IX_Bets_SnapshotId"); b.ToTable("Bets", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.EventEntity", b => { b.Property("EventCode") .HasColumnType("TEXT"); b.Property("Category") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("TEXT") .HasDefaultValue(""); b.Property("CountryCode") .IsRequired() .HasColumnType("TEXT"); b.Property("EventPath") .HasColumnType("TEXT"); b.Property("LeagueId") .IsRequired() .HasColumnType("TEXT"); b.Property("ScheduledAt") .IsRequired() .HasColumnType("TEXT"); b.Property("Side1Name") .IsRequired() .HasColumnType("TEXT"); b.Property("Side2Name") .IsRequired() .HasColumnType("TEXT"); b.Property("SportCode") .HasColumnType("INTEGER"); b.HasKey("EventCode"); b.HasIndex("ScheduledAt") .HasDatabaseName("IX_Events_ScheduledAt"); b.HasIndex("SportCode", "ScheduledAt") .HasDatabaseName("IX_Events_SportCode_ScheduledAt"); b.ToTable("Events", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.EventResultEntity", b => { b.Property("EventCode") .HasColumnType("TEXT"); b.Property("CompletedAt") .IsRequired() .HasColumnType("TEXT"); b.Property("Side1Score") .HasColumnType("INTEGER"); b.Property("Side2Score") .HasColumnType("INTEGER"); b.Property("WinnerSide") .HasColumnType("INTEGER"); b.HasKey("EventCode"); b.ToTable("EventResults", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.LeagueEntity", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Category") .IsRequired() .ValueGeneratedOnAdd() .HasColumnType("TEXT") .HasDefaultValue(""); b.Property("Country") .IsRequired() .HasColumnType("TEXT"); b.Property("NameEn") .IsRequired() .HasColumnType("TEXT"); b.Property("NameRu") .IsRequired() .HasColumnType("TEXT"); b.Property("SportCode") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("Leagues", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.PaperBetEntity", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AnomalyId") .IsRequired() .HasColumnType("TEXT"); b.Property("EventCode") .IsRequired() .HasColumnType("TEXT"); b.Property("OpenedAt") .IsRequired() .HasColumnType("TEXT"); b.Property("Outcome") .HasColumnType("INTEGER"); b.Property("Payout") .HasColumnType("TEXT"); b.Property("PickedSide") .HasColumnType("INTEGER"); b.Property("Rate") .HasColumnType("TEXT"); b.Property("SettledAt") .HasColumnType("TEXT"); b.Property("Stake") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("AnomalyId") .IsUnique() .HasDatabaseName("IX_PaperBets_AnomalyId"); b.HasIndex("Outcome") .HasDatabaseName("IX_PaperBets_Outcome"); b.ToTable("PaperBets", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.PlacedBetEntity", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("EventCode") .IsRequired() .HasColumnType("TEXT"); b.Property("Notes") .HasColumnType("TEXT"); b.Property("Outcome") .HasColumnType("INTEGER"); b.Property("PeriodNumber") .HasColumnType("INTEGER"); b.Property("PlacedAt") .IsRequired() .HasColumnType("TEXT"); b.Property("Rate") .HasColumnType("TEXT"); b.Property("Scope") .HasColumnType("INTEGER"); b.Property("Side") .HasColumnType("INTEGER"); b.Property("Stake") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("EventCode") .HasDatabaseName("IX_PlacedBets_EventCode"); b.HasIndex("Outcome") .HasDatabaseName("IX_PlacedBets_Outcome"); b.ToTable("PlacedBets", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.SavedStrategyEntity", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreatedAt") .IsRequired() .HasColumnType("TEXT"); b.Property("FlatStake") .HasColumnType("TEXT"); b.Property("KellyFraction") .HasColumnType("TEXT"); b.Property("MinScore") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT") .UseCollation("NOCASE"); b.Property("PercentOfBankroll") .HasColumnType("TEXT"); b.Property("StakeRule") .HasColumnType("INTEGER"); b.Property("StartingBankroll") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Name") .IsUnique() .HasDatabaseName("IX_SavedStrategies_Name"); b.ToTable("SavedStrategies", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.SnapshotEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CapturedAt") .IsRequired() .HasColumnType("TEXT"); b.Property("EventCode") .IsRequired() .HasColumnType("TEXT"); b.Property("Source") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("EventCode") .HasDatabaseName("IX_Snapshots_EventCode"); b.HasIndex("EventCode", "CapturedAt") .HasDatabaseName("IX_Snapshots_EventCode_CapturedAt"); b.HasIndex("EventCode", "Source", "CapturedAt") .HasDatabaseName("IX_Snapshots_EventCode_Source_CapturedAt"); b.ToTable("Snapshots", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.SportEntity", b => { b.Property("Code") .HasColumnType("INTEGER"); b.Property("NameEn") .IsRequired() .HasColumnType("TEXT"); b.Property("NameRu") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Code"); b.ToTable("Sports", (string)null); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.AnomalyEntity", b => { b.HasOne("Marathon.Infrastructure.Persistence.Entities.EventEntity", "Event") .WithMany("Anomalies") .HasForeignKey("EventCode") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Event"); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.BetEntity", b => { b.HasOne("Marathon.Infrastructure.Persistence.Entities.SnapshotEntity", "Snapshot") .WithMany("Bets") .HasForeignKey("SnapshotId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Snapshot"); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.EventResultEntity", b => { b.HasOne("Marathon.Infrastructure.Persistence.Entities.EventEntity", "Event") .WithOne("Result") .HasForeignKey("Marathon.Infrastructure.Persistence.Entities.EventResultEntity", "EventCode") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Event"); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.SnapshotEntity", b => { b.HasOne("Marathon.Infrastructure.Persistence.Entities.EventEntity", "Event") .WithMany("Snapshots") .HasForeignKey("EventCode") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Event"); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.EventEntity", b => { b.Navigation("Anomalies"); b.Navigation("Result"); b.Navigation("Snapshots"); }); modelBuilder.Entity("Marathon.Infrastructure.Persistence.Entities.SnapshotEntity", b => { b.Navigation("Bets"); }); #pragma warning restore 612, 618 } } }