// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RR3CommunityServer.Data;

#nullable disable

namespace RR3CommunityServer.Migrations
{
    [DbContext(typeof(RR3DbContext))]
    [Migration("20260218094416_AddUserCurrencyColumns")]
    partial class AddUserCurrencyColumns
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder.HasAnnotation("ProductVersion", "8.0.11");

            modelBuilder.Entity("RR3CommunityServer.Data.Car", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<bool>("Available")
                        .HasColumnType("INTEGER");

                    b.Property<int>("BasePerformanceRating")
                        .HasColumnType("INTEGER");

                    b.Property<string>("CarId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int>("CashPrice")
                        .HasColumnType("INTEGER");

                    b.Property<string>("ClassType")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int>("GoldPrice")
                        .HasColumnType("INTEGER");

                    b.Property<string>("Manufacturer")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("Cars");

                    b.HasData(
                        new
                        {
                            Id = 1,
                            Available = true,
                            BasePerformanceRating = 45,
                            CarId = "nissan_silvia_s15",
                            CashPrice = 25000,
                            ClassType = "C",
                            GoldPrice = 0,
                            Manufacturer = "Nissan",
                            Name = "Nissan Silvia Spec-R"
                        },
                        new
                        {
                            Id = 2,
                            Available = true,
                            BasePerformanceRating = 58,
                            CarId = "ford_focus_rs",
                            CashPrice = 85000,
                            ClassType = "B",
                            GoldPrice = 150,
                            Manufacturer = "Ford",
                            Name = "Ford Focus RS"
                        },
                        new
                        {
                            Id = 3,
                            Available = true,
                            BasePerformanceRating = 72,
                            CarId = "porsche_911_gt3",
                            CashPrice = 0,
                            ClassType = "A",
                            GoldPrice = 350,
                            Manufacturer = "Porsche",
                            Name = "Porsche 911 GT3 RS"
                        },
                        new
                        {
                            Id = 4,
                            Available = true,
                            BasePerformanceRating = 88,
                            CarId = "ferrari_488_gtb",
                            CashPrice = 0,
                            ClassType = "S",
                            GoldPrice = 750,
                            Manufacturer = "Ferrari",
                            Name = "Ferrari 488 GTB"
                        },
                        new
                        {
                            Id = 5,
                            Available = true,
                            BasePerformanceRating = 105,
                            CarId = "mclaren_p1_gtr",
                            CashPrice = 0,
                            ClassType = "R",
                            GoldPrice = 1500,
                            Manufacturer = "McLaren",
                            Name = "McLaren P1 GTR"
                        });
                });

            modelBuilder.Entity("RR3CommunityServer.Data.CarUpgrade", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<string>("CarId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int>("CashCost")
                        .HasColumnType("INTEGER");

                    b.Property<int>("Level")
                        .HasColumnType("INTEGER");

                    b.Property<int>("PerformanceIncrease")
                        .HasColumnType("INTEGER");

                    b.Property<string>("UpgradeType")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("CarUpgrades");

                    b.HasData(
                        new
                        {
                            Id = 1,
                            CarId = "nissan_silvia_s15",
                            CashCost = 5000,
                            Level = 1,
                            PerformanceIncrease = 3,
                            UpgradeType = "engine"
                        },
                        new
                        {
                            Id = 2,
                            CarId = "nissan_silvia_s15",
                            CashCost = 3000,
                            Level = 1,
                            PerformanceIncrease = 2,
                            UpgradeType = "tires"
                        },
                        new
                        {
                            Id = 3,
                            CarId = "nissan_silvia_s15",
                            CashCost = 4000,
                            Level = 1,
                            PerformanceIncrease = 2,
                            UpgradeType = "suspension"
                        },
                        new
                        {
                            Id = 4,
                            CarId = "nissan_silvia_s15",
                            CashCost = 3500,
                            Level = 1,
                            PerformanceIncrease = 2,
                            UpgradeType = "brakes"
                        },
                        new
                        {
                            Id = 5,
                            CarId = "nissan_silvia_s15",
                            CashCost = 4500,
                            Level = 1,
                            PerformanceIncrease = 3,
                            UpgradeType = "drivetrain"
                        });
                });

            modelBuilder.Entity("RR3CommunityServer.Data.CareerProgress", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<double>("BestTime")
                        .HasColumnType("REAL");

                    b.Property<bool>("Completed")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime?>("CompletedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("EventName")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("SeriesName")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int>("StarsEarned")
                        .HasColumnType("INTEGER");

                    b.Property<int>("UserId")
                        .HasColumnType("INTEGER");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("CareerProgress");
                });

            modelBuilder.Entity("RR3CommunityServer.Data.CatalogItem", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<bool>("Available")
                        .HasColumnType("INTEGER");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<decimal>("Price")
                        .HasColumnType("TEXT");

                    b.Property<string>("Sku")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("Type")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("CatalogItems");

                    b.HasData(
                        new
                        {
                            Id = 1,
                            Available = true,
                            Name = "1000 Gold",
                            Price = 0.99m,
                            Sku = "com.ea.rr3.gold_1000",
                            Type = "currency"
                        },
                        new
                        {
                            Id = 2,
                            Available = true,
                            Name = "Starter Car",
                            Price = 0m,
                            Sku = "com.ea.rr3.car_tier1",
                            Type = "car"
                        },
                        new
                        {
                            Id = 3,
                            Available = true,
                            Name = "Engine Upgrade",
                            Price = 4.99m,
                            Sku = "com.ea.rr3.upgrade_engine",
                            Type = "upgrade"
                        },
                        new
                        {
                            Id = 4,
                            Available = true,
                            Name = "100 Gold",
                            Price = 0m,
                            Sku = "com.ea.rr3.gold_100",
                            Type = "currency"
                        },
                        new
                        {
                            Id = 5,
                            Available = true,
                            Name = "500 Gold",
                            Price = 0m,
                            Sku = "com.ea.rr3.gold_500",
                            Type = "currency"
                        },
                        new
                        {
                            Id = 6,
                            Available = true,
                            Name = "1000 Gold",
                            Price = 0m,
                            Sku = "com.ea.rr3.gold_1000",
                            Type = "currency"
                        },
                        new
                        {
                            Id = 7,
                            Available = true,
                            Name = "5000 Gold",
                            Price = 0m,
                            Sku = "com.ea.rr3.gold_5000",
                            Type = "currency"
                        });
                });

            modelBuilder.Entity("RR3CommunityServer.Data.DailyReward", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<int>("CashAmount")
                        .HasColumnType("INTEGER");

                    b.Property<bool>("Claimed")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime?>("ClaimedAt")
                        .HasColumnType("TEXT");

                    b.Property<int>("GoldAmount")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime>("RewardDate")
                        .HasColumnType("TEXT");

                    b.Property<int>("Streak")
                        .HasColumnType("INTEGER");

                    b.Property<int>("UserId")
                        .HasColumnType("INTEGER");

                    b.HasKey("Id");

                    b.ToTable("DailyRewards");
                });

            modelBuilder.Entity("RR3CommunityServer.Data.Device", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("DeviceId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("HardwareId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<DateTime>("LastSeenAt")
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("Devices");
                });

            modelBuilder.Entity("RR3CommunityServer.Data.GameAsset", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<int>("AccessCount")
                        .HasColumnType("INTEGER");

                    b.Property<string>("AssetId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("AssetType")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("CarId")
                        .HasColumnType("TEXT");

                    b.Property<string>("Category")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("ContentType")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<DateTime>("DownloadedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("EaCdnPath")
                        .HasColumnType("TEXT");

                    b.Property<string>("FileName")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("FileSha256")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<long>("FileSize")
                        .HasColumnType("INTEGER");

                    b.Property<bool>("IsAvailable")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime>("LastAccessedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("LocalPath")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("OriginalUrl")
                        .HasColumnType("TEXT");

                    b.Property<string>("TrackId")
                        .HasColumnType("TEXT");

                    b.Property<string>("Version")
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("GameAssets");
                });

            modelBuilder.Entity("RR3CommunityServer.Data.OwnedCar", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<string>("CarId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("CarName")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("ClassType")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("Manufacturer")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int>("PerformanceRating")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime>("PurchasedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("PurchasedUpgrades")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int>("UpgradeLevel")
                        .HasColumnType("INTEGER");

                    b.Property<int>("UserId")
                        .HasColumnType("INTEGER");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("OwnedCars");
                });

            modelBuilder.Entity("RR3CommunityServer.Data.Purchase", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<string>("ItemId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("OrderId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<decimal>("Price")
                        .HasColumnType("TEXT");

                    b.Property<DateTime>("PurchaseTime")
                        .HasColumnType("TEXT");

                    b.Property<string>("Sku")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("Status")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("SynergyId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("Token")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int?>("UserId")
                        .HasColumnType("INTEGER");

                    b.HasKey("Id");

                    b.ToTable("Purchases");
                });

            modelBuilder.Entity("RR3CommunityServer.Data.Session", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("DeviceId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<DateTime>("ExpiresAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("SessionId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<string>("SynergyId")
                        .HasColumnType("TEXT");

                    b.Property<int?>("UserId")
                        .HasColumnType("INTEGER");

                    b.HasKey("Id");

                    b.ToTable("Sessions");
                });

            modelBuilder.Entity("RR3CommunityServer.Data.TimeTrial", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<bool>("Active")
                        .HasColumnType("INTEGER");

                    b.Property<string>("CarName")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<int>("CashReward")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime>("EndDate")
                        .HasColumnType("TEXT");

                    b.Property<int>("GoldReward")
                        .HasColumnType("INTEGER");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<DateTime>("StartDate")
                        .HasColumnType("TEXT");

                    b.Property<double>("TargetTime")
                        .HasColumnType("REAL");

                    b.Property<string>("TrackName")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("TimeTrials");

                    b.HasData(
                        new
                        {
                            Id = 1,
                            Active = true,
                            CarName = "Any Car",
                            CashReward = 10000,
                            EndDate = new DateTime(2026, 2, 25, 9, 44, 15, 715, DateTimeKind.Utc).AddTicks(5651),
                            GoldReward = 50,
                            Name = "Daily Sprint Challenge",
                            StartDate = new DateTime(2026, 2, 18, 9, 44, 15, 715, DateTimeKind.Utc).AddTicks(5648),
                            TargetTime = 90.5,
                            TrackName = "Silverstone National"
                        },
                        new
                        {
                            Id = 2,
                            Active = true,
                            CarName = "Any Car",
                            CashReward = 25000,
                            EndDate = new DateTime(2026, 2, 25, 9, 44, 15, 715, DateTimeKind.Utc).AddTicks(5658),
                            GoldReward = 100,
                            Name = "Speed Demon Trial",
                            StartDate = new DateTime(2026, 2, 18, 9, 44, 15, 715, DateTimeKind.Utc).AddTicks(5658),
                            TargetTime = 120.0,
                            TrackName = "Dubai Autodrome"
                        });
                });

            modelBuilder.Entity("RR3CommunityServer.Data.TimeTrialResult", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<bool>("BeatTarget")
                        .HasColumnType("INTEGER");

                    b.Property<int>("CashEarned")
                        .HasColumnType("INTEGER");

                    b.Property<int>("GoldEarned")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime>("SubmittedAt")
                        .HasColumnType("TEXT");

                    b.Property<double>("TimeSeconds")
                        .HasColumnType("REAL");

                    b.Property<int>("TimeTrialId")
                        .HasColumnType("INTEGER");

                    b.Property<int>("UserId")
                        .HasColumnType("INTEGER");

                    b.HasKey("Id");

                    b.ToTable("TimeTrialResults");
                });

            modelBuilder.Entity("RR3CommunityServer.Data.User", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<int?>("Cash")
                        .HasColumnType("INTEGER");

                    b.Property<DateTime>("CreatedAt")
                        .HasColumnType("TEXT");

                    b.Property<string>("DeviceId")
                        .HasColumnType("TEXT");

                    b.Property<int?>("Experience")
                        .HasColumnType("INTEGER");

                    b.Property<int?>("Gold")
                        .HasColumnType("INTEGER");

                    b.Property<int?>("Level")
                        .HasColumnType("INTEGER");

                    b.Property<string>("Nickname")
                        .HasColumnType("TEXT");

                    b.Property<int?>("Reputation")
                        .HasColumnType("INTEGER");

                    b.Property<string>("SynergyId")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("Users");
                });

            modelBuilder.Entity("RR3CommunityServer.Data.CareerProgress", b =>
                {
                    b.HasOne("RR3CommunityServer.Data.User", null)
                        .WithMany("CareerProgress")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("RR3CommunityServer.Data.OwnedCar", b =>
                {
                    b.HasOne("RR3CommunityServer.Data.User", null)
                        .WithMany("OwnedCars")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("RR3CommunityServer.Data.User", b =>
                {
                    b.Navigation("CareerProgress");

                    b.Navigation("OwnedCars");
                });
#pragma warning restore 612, 618
        }
    }
}
