111 lines
3.6 KiB
C#
111 lines
3.6 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("20230528183503_D99E1078-A3A4-43E9-BA5A-5E0B00723B68")]
|
|
partial class D99E1078A3A443E9BA5A5E0B00723B68
|
|
{
|
|
/// <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>("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
|
|
}
|
|
}
|
|
}
|