//
using System;
using Duende.IdentityServer.EntityFramework.DbContexts;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ZeroFramework.IdentityServer.API.Migrations.PersistedGrantMigrations
{
[DbContext(typeof(PersistedGrantDbContext))]
partial class PersistedGrantDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b =>
{
b.Property("UserCode")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("ClientId")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("Data")
.IsRequired()
.HasMaxLength(50000)
.HasColumnType("nvarchar(max)");
b.Property("Description")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("DeviceCode")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("Expiration")
.IsRequired()
.HasColumnType("datetime2");
b.Property("SessionId")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("SubjectId")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.HasKey("UserCode");
b.HasIndex("DeviceCode")
.IsUnique();
b.HasIndex("Expiration");
b.ToTable("DeviceCodes", (string)null);
});
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b =>
{
b.Property("Id")
.HasColumnType("nvarchar(450)");
b.Property("Algorithm")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("Created")
.HasColumnType("datetime2");
b.Property("Data")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("DataProtected")
.HasColumnType("bit");
b.Property("IsX509Certificate")
.HasColumnType("bit");
b.Property("Use")
.HasColumnType("nvarchar(450)");
b.Property("Version")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("Use");
b.ToTable("Keys", (string)null);
});
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("ClientId")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("ConsumedTime")
.HasColumnType("datetime2");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("Data")
.IsRequired()
.HasMaxLength(50000)
.HasColumnType("nvarchar(max)");
b.Property("Description")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("Expiration")
.HasColumnType("datetime2");
b.Property("Key")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("SessionId")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("SubjectId")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property("Type")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("Id");
b.HasIndex("ConsumedTime");
b.HasIndex("Expiration");
b.HasIndex("Key")
.IsUnique()
.HasFilter("[Key] IS NOT NULL");
b.HasIndex("SubjectId", "ClientId", "Type");
b.HasIndex("SubjectId", "SessionId", "Type");
b.ToTable("PersistedGrants", (string)null);
});
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Created")
.HasColumnType("datetime2");
b.Property("Data")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("DisplayName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("Expires")
.HasColumnType("datetime2");
b.Property("Key")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("Renewed")
.HasColumnType("datetime2");
b.Property("Scheme")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("SessionId")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property("SubjectId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.HasKey("Id");
b.HasIndex("DisplayName");
b.HasIndex("Expires");
b.HasIndex("Key")
.IsUnique();
b.HasIndex("SessionId");
b.HasIndex("SubjectId");
b.ToTable("ServerSideSessions", (string)null);
});
#pragma warning restore 612, 618
}
}
}