IdentityVSAPI
301 строка · 10.9 Кб
1// <auto-generated />
2using System;3using IdentityVSAPI.DAL;4using Microsoft.EntityFrameworkCore;5using Microsoft.EntityFrameworkCore.Infrastructure;6using Microsoft.EntityFrameworkCore.Migrations;7using Microsoft.EntityFrameworkCore.Storage.ValueConversion;8using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;9
10#nullable disable11
12namespace IdentityVSAPI.DAL.Migrations13{
14[DbContext(typeof(ApplicationDbContext))]15[Migration("20230802064950_AddToDbIdentity")]16partial class AddToDbIdentity17{18/// <inheritdoc />19protected override void BuildTargetModel(ModelBuilder modelBuilder)20{21#pragma warning disable 612, 61822modelBuilder
23.HasAnnotation("ProductVersion", "7.0.9")24.HasAnnotation("Relational:MaxIdentifierLength", 63);25
26NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);27
28modelBuilder.Entity("IdentityVSAPI.Domain.Entity.ApplicationUser", b =>29{30b.Property<long>("Id")31.ValueGeneratedOnAdd()32.HasColumnType("bigint");33
34NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));35
36b.Property<int>("AccessFailedCount")37.HasColumnType("integer");38
39b.Property<DateTime>("BirthDate")40.HasColumnType("timestamp without time zone");41
42b.Property<string>("ConcurrencyStamp")43.IsConcurrencyToken()44.HasColumnType("text");45
46b.Property<string>("Email")47.HasMaxLength(256)48.HasColumnType("character varying(256)");49
50b.Property<bool>("EmailConfirmed")51.HasColumnType("boolean");52
53b.Property<string>("FirstName")54.IsRequired()55.HasColumnType("text");56
57b.Property<string>("LastName")58.IsRequired()59.HasColumnType("text");60
61b.Property<bool>("LockoutEnabled")62.HasColumnType("boolean");63
64b.Property<DateTimeOffset?>("LockoutEnd")65.HasColumnType("timestamp with time zone");66
67b.Property<string>("MiddleName")68.HasColumnType("text");69
70b.Property<string>("NormalizedEmail")71.HasMaxLength(256)72.HasColumnType("character varying(256)");73
74b.Property<string>("NormalizedUserName")75.HasMaxLength(256)76.HasColumnType("character varying(256)");77
78b.Property<string>("PasswordHash")79.HasColumnType("text");80
81b.Property<string>("PhoneNumber")82.HasColumnType("text");83
84b.Property<bool>("PhoneNumberConfirmed")85.HasColumnType("boolean");86
87b.Property<string>("RefreshToken")88.IsRequired()89.HasColumnType("text");90
91b.Property<DateTime>("RefreshTokenExpiryTime")92.HasColumnType("timestamp without time zone");93
94b.Property<string>("SecurityStamp")95.HasColumnType("text");96
97b.Property<bool>("TwoFactorEnabled")98.HasColumnType("boolean");99
100b.Property<string>("UserName")101.HasMaxLength(256)102.HasColumnType("character varying(256)");103
104b.HasKey("Id");105
106b.HasIndex("NormalizedEmail")107.HasDatabaseName("EmailIndex");108
109b.HasIndex("NormalizedUserName")110.IsUnique()111.HasDatabaseName("UserNameIndex");112
113b.ToTable("AspNetUsers", (string)null);114});115
116modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole<long>", b =>117{118b.Property<long>("Id")119.ValueGeneratedOnAdd()120.HasColumnType("bigint");121
122NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));123
124b.Property<string>("ConcurrencyStamp")125.IsConcurrencyToken()126.HasColumnType("text");127
128b.Property<string>("Name")129.HasMaxLength(256)130.HasColumnType("character varying(256)");131
132b.Property<string>("NormalizedName")133.HasMaxLength(256)134.HasColumnType("character varying(256)");135
136b.HasKey("Id");137
138b.HasIndex("NormalizedName")139.IsUnique()140.HasDatabaseName("RoleNameIndex");141
142b.ToTable("AspNetRoles", (string)null);143});144
145modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<long>", b =>146{147b.Property<int>("Id")148.ValueGeneratedOnAdd()149.HasColumnType("integer");150
151NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));152
153b.Property<string>("ClaimType")154.HasColumnType("text");155
156b.Property<string>("ClaimValue")157.HasColumnType("text");158
159b.Property<long>("RoleId")160.HasColumnType("bigint");161
162b.HasKey("Id");163
164b.HasIndex("RoleId");165
166b.ToTable("AspNetRoleClaims", (string)null);167});168
169modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<long>", b =>170{171b.Property<int>("Id")172.ValueGeneratedOnAdd()173.HasColumnType("integer");174
175NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));176
177b.Property<string>("ClaimType")178.HasColumnType("text");179
180b.Property<string>("ClaimValue")181.HasColumnType("text");182
183b.Property<long>("UserId")184.HasColumnType("bigint");185
186b.HasKey("Id");187
188b.HasIndex("UserId");189
190b.ToTable("AspNetUserClaims", (string)null);191});192
193modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<long>", b =>194{195b.Property<string>("LoginProvider")196.HasColumnType("text");197
198b.Property<string>("ProviderKey")199.HasColumnType("text");200
201b.Property<string>("ProviderDisplayName")202.HasColumnType("text");203
204b.Property<long>("UserId")205.HasColumnType("bigint");206
207b.HasKey("LoginProvider", "ProviderKey");208
209b.HasIndex("UserId");210
211b.ToTable("AspNetUserLogins", (string)null);212});213
214modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<long>", b =>215{216b.Property<long>("UserId")217.HasColumnType("bigint");218
219b.Property<long>("RoleId")220.HasColumnType("bigint");221
222b.HasKey("UserId", "RoleId");223
224b.HasIndex("RoleId");225
226b.ToTable("AspNetUserRoles", (string)null);227});228
229modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<long>", b =>230{231b.Property<long>("UserId")232.HasColumnType("bigint");233
234b.Property<string>("LoginProvider")235.HasColumnType("text");236
237b.Property<string>("Name")238.HasColumnType("text");239
240b.Property<string>("Value")241.HasColumnType("text");242
243b.HasKey("UserId", "LoginProvider", "Name");244
245b.ToTable("AspNetUserTokens", (string)null);246});247
248modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<long>", b =>249{250b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<long>", null)251.WithMany()252.HasForeignKey("RoleId")253.OnDelete(DeleteBehavior.Cascade)254.IsRequired();255});256
257modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<long>", b =>258{259b.HasOne("IdentityVSAPI.Domain.Entity.ApplicationUser", null)260.WithMany()261.HasForeignKey("UserId")262.OnDelete(DeleteBehavior.Cascade)263.IsRequired();264});265
266modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<long>", b =>267{268b.HasOne("IdentityVSAPI.Domain.Entity.ApplicationUser", null)269.WithMany()270.HasForeignKey("UserId")271.OnDelete(DeleteBehavior.Cascade)272.IsRequired();273});274
275modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<long>", b =>276{277b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<long>", null)278.WithMany()279.HasForeignKey("RoleId")280.OnDelete(DeleteBehavior.Cascade)281.IsRequired();282
283b.HasOne("IdentityVSAPI.Domain.Entity.ApplicationUser", null)284.WithMany()285.HasForeignKey("UserId")286.OnDelete(DeleteBehavior.Cascade)287.IsRequired();288});289
290modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<long>", b =>291{292b.HasOne("IdentityVSAPI.Domain.Entity.ApplicationUser", null)293.WithMany()294.HasForeignKey("UserId")295.OnDelete(DeleteBehavior.Cascade)296.IsRequired();297});298#pragma warning restore 612, 618299}300}301}
302