80 lines
2.8 KiB
C#
80 lines
2.8 KiB
C#
// <auto-generated />
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using StalwartSimpleLoginMiddleware.Contexts;
|
|
|
|
#nullable disable
|
|
|
|
namespace StalwartSimpleLoginMiddleware.Migrations
|
|
{
|
|
[DbContext(typeof(ApiKeyContext))]
|
|
partial class ApiKeyContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.11")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("StalwartSimpleLoginMiddleware.Entities.ApiKey", b =>
|
|
{
|
|
b.Property<string>("Key")
|
|
.HasMaxLength(88)
|
|
.IsUnicode(false)
|
|
.HasColumnType("character varying(88)");
|
|
|
|
b.Property<bool>("IsAdmin")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("OwnerEmail")
|
|
.IsRequired()
|
|
.HasMaxLength(254)
|
|
.HasColumnType("character varying(254)");
|
|
|
|
b.HasKey("Key");
|
|
|
|
b.ToTable("ApiKeys");
|
|
});
|
|
|
|
modelBuilder.Entity("StalwartSimpleLoginMiddleware.Entities.Member", b =>
|
|
{
|
|
b.Property<string>("ApiKeyId")
|
|
.HasMaxLength(88)
|
|
.HasColumnType("character varying(88)");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(254)
|
|
.HasColumnType("character varying(254)");
|
|
|
|
b.Property<bool>("IsExternal")
|
|
.HasColumnType("boolean");
|
|
|
|
b.HasKey("ApiKeyId", "Email");
|
|
|
|
b.ToTable("Members");
|
|
});
|
|
|
|
modelBuilder.Entity("StalwartSimpleLoginMiddleware.Entities.Member", b =>
|
|
{
|
|
b.HasOne("StalwartSimpleLoginMiddleware.Entities.ApiKey", "ApiKey")
|
|
.WithMany("Members")
|
|
.HasForeignKey("ApiKeyId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("ApiKey");
|
|
});
|
|
|
|
modelBuilder.Entity("StalwartSimpleLoginMiddleware.Entities.ApiKey", b =>
|
|
{
|
|
b.Navigation("Members");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|