Files
rr3-server/RR3CommunityServer/Migrations/RR3DbContextModelSnapshot.cs
Daniel Elliott a6167c8249 Complete Records/Leaderboards + Time Trials systems (100%)
RECORDS & LEADERBOARDS (5/5 endpoints - 100%):
- Created LeaderboardsController with 5 endpoints
- GET /synergy/leaderboards/timetrials/{trialId}
- GET /synergy/leaderboards/career/{series}/{event}
- GET /synergy/leaderboards/global/top100
- GET /synergy/leaderboards/player/{synergyId}/records
- GET /synergy/leaderboards/compare/{synergyId1}/{synergyId2}

Added LeaderboardEntry and PersonalRecord models and database tables.
Migration applied: AddLeaderboardsAndRecords

Updated RewardsController.SubmitTimeTrial to track personal bests,
update leaderboards, and award 50 gold bonus for improvements.

Updated ProgressionController.CompleteCareerEvent similarly for
career event personal records.

TIME TRIALS (6/6 endpoints - 100%):
- GET /synergy/rewards/timetrials - List with time remaining
- GET /synergy/rewards/timetrials/{id} - Details with stats
- POST /synergy/rewards/timetrials/{id}/submit - Submit with PB tracking
- GET /synergy/rewards/timetrials/player/{synergyId}/results - History
- POST /synergy/rewards/timetrials/{id}/claim - Claim bonuses
- GET /synergy/leaderboards/timetrials/{id} - Leaderboards (above)

Added navigation properties to TimeTrialResult for easier queries.

Server progress: 66/73 endpoints (90%)
Two complete systems: Records/Leaderboards + Time Trials

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-22 17:49:23 -08:00

1075 lines
37 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RR3CommunityServer.Data;
#nullable disable
namespace RR3CommunityServer.Migrations
{
[DbContext(typeof(RR3DbContext))]
partial class RR3DbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(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<DateTime?>("CreatedAt")
.HasColumnType("TEXT");
b.Property<string>("CustomAuthor")
.HasColumnType("TEXT");
b.Property<string>("CustomVersion")
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<int>("GoldPrice")
.HasColumnType("INTEGER");
b.Property<bool>("IsCustom")
.HasColumnType("INTEGER");
b.Property<string>("Manufacturer")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("Year")
.HasColumnType("INTEGER");
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,
IsCustom = false,
Manufacturer = "Nissan",
Name = "Nissan Silvia Spec-R",
Year = 0
},
new
{
Id = 2,
Available = true,
BasePerformanceRating = 58,
CarId = "ford_focus_rs",
CashPrice = 85000,
ClassType = "B",
GoldPrice = 150,
IsCustom = false,
Manufacturer = "Ford",
Name = "Ford Focus RS",
Year = 0
},
new
{
Id = 3,
Available = true,
BasePerformanceRating = 72,
CarId = "porsche_911_gt3",
CashPrice = 0,
ClassType = "A",
GoldPrice = 350,
IsCustom = false,
Manufacturer = "Porsche",
Name = "Porsche 911 GT3 RS",
Year = 0
},
new
{
Id = 4,
Available = true,
BasePerformanceRating = 88,
CarId = "ferrari_488_gtb",
CashPrice = 0,
ClassType = "S",
GoldPrice = 750,
IsCustom = false,
Manufacturer = "Ferrari",
Name = "Ferrari 488 GTB",
Year = 0
},
new
{
Id = 5,
Available = true,
BasePerformanceRating = 105,
CarId = "mclaren_p1_gtr",
CashPrice = 0,
ClassType = "R",
GoldPrice = 1500,
IsCustom = false,
Manufacturer = "McLaren",
Name = "McLaren P1 GTR",
Year = 0
});
});
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<long?>("CompressedSize")
.HasColumnType("INTEGER");
b.Property<string>("ContentType")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("CustomAuthor")
.HasColumnType("TEXT");
b.Property<string>("Description")
.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")
.HasColumnType("TEXT");
b.Property<long>("FileSize")
.HasColumnType("INTEGER");
b.Property<bool>("IsAvailable")
.HasColumnType("INTEGER");
b.Property<bool>("IsCustomContent")
.HasColumnType("INTEGER");
b.Property<bool>("IsRequired")
.HasColumnType("INTEGER");
b.Property<DateTime>("LastAccessedAt")
.HasColumnType("TEXT");
b.Property<string>("LocalPath")
.HasColumnType("TEXT");
b.Property<string>("Md5Hash")
.HasColumnType("TEXT");
b.Property<string>("OriginalUrl")
.HasColumnType("TEXT");
b.Property<string>("TrackId")
.HasColumnType("TEXT");
b.Property<DateTime>("UploadedAt")
.HasColumnType("TEXT");
b.Property<string>("Version")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("GameAssets");
});
modelBuilder.Entity("RR3CommunityServer.Data.LeaderboardEntry", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("CarName")
.HasColumnType("TEXT");
b.Property<string>("PlayerName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("RecordCategory")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("RecordType")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("SubmittedAt")
.HasColumnType("TEXT");
b.Property<string>("SynergyId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<double>("TimeSeconds")
.HasColumnType("REAL");
b.Property<string>("TrackName")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("LeaderboardEntries");
});
modelBuilder.Entity("RR3CommunityServer.Data.ModPack", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Author")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("CarIds")
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<int>("DownloadCount")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("PackId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<double>("Rating")
.HasColumnType("REAL");
b.Property<string>("TrackIds")
.HasColumnType("TEXT");
b.Property<DateTime?>("UpdatedAt")
.HasColumnType("TEXT");
b.Property<string>("Version")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("ModPacks");
});
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.PersonalRecord", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("AchievedAt")
.HasColumnType("TEXT");
b.Property<double>("BestTimeSeconds")
.HasColumnType("REAL");
b.Property<string>("CarName")
.HasColumnType("TEXT");
b.Property<double?>("ImprovementSeconds")
.HasColumnType("REAL");
b.Property<DateTime?>("PreviousBestTime")
.HasColumnType("TEXT");
b.Property<string>("RecordCategory")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("RecordType")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SynergyId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("TotalAttempts")
.HasColumnType("INTEGER");
b.Property<string>("TrackName")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("PersonalRecords");
});
modelBuilder.Entity("RR3CommunityServer.Data.PlayerSave", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<DateTime>("LastModified")
.HasColumnType("TEXT");
b.Property<string>("SaveDataJson")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SynergyId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<long>("Version")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("PlayerSaves");
});
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, 3, 2, 1, 33, 39, 587, DateTimeKind.Utc).AddTicks(7946),
GoldReward = 50,
Name = "Daily Sprint Challenge",
StartDate = new DateTime(2026, 2, 23, 1, 33, 39, 587, DateTimeKind.Utc).AddTicks(7944),
TargetTime = 90.5,
TrackName = "Silverstone National"
},
new
{
Id = 2,
Active = true,
CarName = "Any Car",
CashReward = 25000,
EndDate = new DateTime(2026, 3, 2, 1, 33, 39, 587, DateTimeKind.Utc).AddTicks(7954),
GoldReward = 100,
Name = "Speed Demon Trial",
StartDate = new DateTime(2026, 2, 23, 1, 33, 39, 587, DateTimeKind.Utc).AddTicks(7954),
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.Models.Account", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("EmailVerificationToken")
.HasColumnType("TEXT");
b.Property<bool>("EmailVerified")
.HasColumnType("INTEGER");
b.Property<bool>("IsActive")
.HasColumnType("INTEGER");
b.Property<DateTime?>("LastLoginAt")
.HasColumnType("TEXT");
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime?>("PasswordResetExpiry")
.HasColumnType("TEXT");
b.Property<string>("PasswordResetToken")
.HasColumnType("TEXT");
b.Property<int?>("UserId")
.HasColumnType("INTEGER");
b.Property<string>("Username")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("Accounts");
});
modelBuilder.Entity("RR3CommunityServer.Models.DeviceAccount", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("AccountId")
.HasColumnType("INTEGER");
b.Property<string>("DeviceId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("DeviceName")
.HasColumnType("TEXT");
b.Property<DateTime>("LastUsedAt")
.HasColumnType("TEXT");
b.Property<DateTime>("LinkedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AccountId");
b.ToTable("DeviceAccounts");
});
modelBuilder.Entity("RR3CommunityServer.Models.UserSettings", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("DeviceId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("LastUpdated")
.HasColumnType("TEXT");
b.Property<string>("Mode")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("ServerUrl")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("UserSettings");
});
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.Models.Account", b =>
{
b.HasOne("RR3CommunityServer.Data.User", "User")
.WithMany()
.HasForeignKey("UserId");
b.Navigation("User");
});
modelBuilder.Entity("RR3CommunityServer.Models.DeviceAccount", b =>
{
b.HasOne("RR3CommunityServer.Models.Account", "Account")
.WithMany("LinkedDevices")
.HasForeignKey("AccountId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Account");
});
modelBuilder.Entity("RR3CommunityServer.Data.User", b =>
{
b.Navigation("CareerProgress");
b.Navigation("OwnedCars");
});
modelBuilder.Entity("RR3CommunityServer.Models.Account", b =>
{
b.Navigation("LinkedDevices");
});
#pragma warning restore 612, 618
}
}
}