90 lines
2.7 KiB
C#
90 lines
2.7 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Server.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace Server.Migrations
|
|
{
|
|
[DbContext(typeof(ServerDbContext))]
|
|
[Migration("20220717101814_AddUserRole")]
|
|
partial class AddUserRole
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "6.0.6");
|
|
|
|
modelBuilder.Entity("DatabaseModels.Plain.ScoreboardRecord", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("PostTime")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Score")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Scoreboard");
|
|
});
|
|
|
|
modelBuilder.Entity("DatabaseModels.Plain.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PasswordSalt")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Role")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("DatabaseModels.Plain.ScoreboardRecord", b =>
|
|
{
|
|
b.HasOne("DatabaseModels.Plain.User", "User")
|
|
.WithMany("ScoreboardRecords")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("DatabaseModels.Plain.User", b =>
|
|
{
|
|
b.Navigation("ScoreboardRecords");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|