121 lines
4 KiB
C#
121 lines
4 KiB
C#
// <auto-generated />
|
|
using Authinator.Backend.Database;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace Authinator.Migrations
|
|
{
|
|
[DbContext(typeof(DatabaseContext))]
|
|
[Migration("20230529020954_02A5FFA6-D336-4CB6-B7DE-3BACD30101F0")]
|
|
partial class _02A5FFA6D3364CB6B7DE3BACD30101F0
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "7.0.4");
|
|
|
|
modelBuilder.Entity("Authinator.Backend.Database.Tables.Config", b =>
|
|
{
|
|
b.Property<string>("Key")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("Key");
|
|
|
|
b.Property<string>("Value")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("Value");
|
|
|
|
b.HasKey("Key");
|
|
|
|
b.ToTable("Config", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Authinator.Backend.Database.Tables.Group", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("Name");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Groups", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Authinator.Backend.Database.Tables.User", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("Email");
|
|
|
|
b.Property<int>("Iteration")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER")
|
|
.HasDefaultValue(0)
|
|
.HasColumnName("Iteration");
|
|
|
|
b.Property<string>("Password")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("Password");
|
|
|
|
b.Property<string>("Reference")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("Reference");
|
|
|
|
b.Property<string>("Username")
|
|
.HasColumnType("TEXT")
|
|
.HasColumnName("Username");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("GroupUser", b =>
|
|
{
|
|
b.Property<int>("GroupsId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("GroupsId", "UserId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("GroupUser");
|
|
});
|
|
|
|
modelBuilder.Entity("GroupUser", b =>
|
|
{
|
|
b.HasOne("Authinator.Backend.Database.Tables.Group", null)
|
|
.WithMany()
|
|
.HasForeignKey("GroupsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Authinator.Backend.Database.Tables.User", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|