You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DatabaseContextModelSnapshot.cs 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. // <auto-generated />
  2. using System;
  3. using Diligent.WebAPI.Data;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Metadata;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. #nullable disable
  9. namespace Diligent.WebAPI.Data.Migrations
  10. {
  11. [DbContext(typeof(DatabaseContext))]
  12. partial class DatabaseContextModelSnapshot : ModelSnapshot
  13. {
  14. protected override void BuildModel(ModelBuilder modelBuilder)
  15. {
  16. #pragma warning disable 612, 618
  17. modelBuilder
  18. .HasAnnotation("ProductVersion", "6.0.10")
  19. .HasAnnotation("Relational:MaxIdentifierLength", 128);
  20. SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
  21. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b =>
  22. {
  23. b.Property<int>("ApplicantId")
  24. .ValueGeneratedOnAdd()
  25. .HasColumnType("int");
  26. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ApplicantId"), 1L, 1);
  27. b.Property<string>("ApplicationChannel")
  28. .HasColumnType("nvarchar(max)");
  29. b.Property<string>("BitBucketLink")
  30. .HasColumnType("nvarchar(max)");
  31. b.Property<string>("CV")
  32. .IsRequired()
  33. .HasColumnType("nvarchar(max)");
  34. b.Property<DateTime>("DateOfApplication")
  35. .HasColumnType("datetime2");
  36. b.Property<string>("Email")
  37. .IsRequired()
  38. .HasMaxLength(128)
  39. .HasColumnType("nvarchar(128)");
  40. b.Property<int>("Experience")
  41. .HasColumnType("int");
  42. b.Property<string>("FirstName")
  43. .IsRequired()
  44. .HasMaxLength(128)
  45. .HasColumnType("nvarchar(128)");
  46. b.Property<string>("GithubLink")
  47. .HasColumnType("nvarchar(max)");
  48. b.Property<string>("LastName")
  49. .IsRequired()
  50. .HasMaxLength(128)
  51. .HasColumnType("nvarchar(128)");
  52. b.Property<string>("LinkedlnLink")
  53. .HasColumnType("nvarchar(max)");
  54. b.Property<string>("PhoneNumber")
  55. .IsRequired()
  56. .HasMaxLength(30)
  57. .HasColumnType("nvarchar(30)");
  58. b.Property<string>("Position")
  59. .IsRequired()
  60. .HasMaxLength(128)
  61. .HasColumnType("nvarchar(128)");
  62. b.HasKey("ApplicantId");
  63. b.ToTable("Applicants");
  64. });
  65. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b =>
  66. {
  67. b.Property<int>("Id")
  68. .ValueGeneratedOnAdd()
  69. .HasColumnType("int");
  70. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  71. b.Property<int>("ApplicantId")
  72. .HasColumnType("int");
  73. b.Property<int>("TechnologyId")
  74. .HasColumnType("int");
  75. b.HasKey("Id");
  76. b.HasIndex("ApplicantId");
  77. b.HasIndex("TechnologyId");
  78. b.ToTable("ApplicantTechnologies");
  79. });
  80. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.AppRole", b =>
  81. {
  82. b.Property<int>("Id")
  83. .ValueGeneratedOnAdd()
  84. .HasColumnType("int");
  85. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  86. b.Property<string>("ConcurrencyStamp")
  87. .IsConcurrencyToken()
  88. .HasColumnType("nvarchar(max)");
  89. b.Property<string>("Name")
  90. .HasMaxLength(256)
  91. .HasColumnType("nvarchar(256)");
  92. b.Property<string>("NormalizedName")
  93. .HasMaxLength(256)
  94. .HasColumnType("nvarchar(256)");
  95. b.HasKey("Id");
  96. b.HasIndex("NormalizedName")
  97. .IsUnique()
  98. .HasDatabaseName("RoleNameIndex")
  99. .HasFilter("[NormalizedName] IS NOT NULL");
  100. b.ToTable("AspNetRoles", (string)null);
  101. });
  102. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b =>
  103. {
  104. b.Property<long>("Id")
  105. .ValueGeneratedOnAdd()
  106. .HasColumnType("bigint");
  107. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  108. b.Property<string>("City")
  109. .IsRequired()
  110. .HasColumnType("nvarchar(max)");
  111. b.Property<string>("Country")
  112. .IsRequired()
  113. .HasColumnType("nvarchar(max)");
  114. b.Property<DateTime>("CreatedAtUtc")
  115. .HasColumnType("datetime2");
  116. b.Property<DateTime?>("DeletedAtUtc")
  117. .HasColumnType("datetime2");
  118. b.Property<string>("Fax")
  119. .IsRequired()
  120. .HasColumnType("nvarchar(max)");
  121. b.Property<string>("LegalAddress")
  122. .IsRequired()
  123. .HasColumnType("nvarchar(max)");
  124. b.Property<string>("LegalEmail")
  125. .IsRequired()
  126. .HasColumnType("nvarchar(max)");
  127. b.Property<string>("Name")
  128. .IsRequired()
  129. .HasColumnType("nvarchar(max)");
  130. b.Property<string>("PhoneNumber")
  131. .IsRequired()
  132. .HasColumnType("nvarchar(max)");
  133. b.Property<string>("PostalCode")
  134. .IsRequired()
  135. .HasColumnType("nvarchar(max)");
  136. b.Property<DateTime?>("UpdatedAtUtc")
  137. .HasColumnType("datetime2");
  138. b.HasKey("Id");
  139. b.ToTable("InsuranceCompanies");
  140. });
  141. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  142. {
  143. b.Property<long>("Id")
  144. .ValueGeneratedOnAdd()
  145. .HasColumnType("bigint");
  146. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  147. b.Property<DateTime>("CreatedAtUtc")
  148. .HasColumnType("datetime2");
  149. b.Property<DateTime?>("DeletedAtUtc")
  150. .HasColumnType("datetime2");
  151. b.Property<DateTime>("EndDate")
  152. .HasColumnType("datetime2");
  153. b.Property<long>("InsurerId")
  154. .HasColumnType("bigint");
  155. b.Property<decimal>("Premium")
  156. .HasColumnType("decimal(18,2)");
  157. b.Property<DateTime>("StartDate")
  158. .HasColumnType("datetime2");
  159. b.Property<string>("Type")
  160. .IsRequired()
  161. .HasColumnType("nvarchar(max)");
  162. b.Property<DateTime?>("UpdatedAtUtc")
  163. .HasColumnType("datetime2");
  164. b.HasKey("Id");
  165. b.HasIndex("InsurerId");
  166. b.ToTable("InsurancePolicies");
  167. });
  168. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  169. {
  170. b.Property<long>("Id")
  171. .ValueGeneratedOnAdd()
  172. .HasColumnType("bigint");
  173. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  174. b.Property<string>("Address")
  175. .IsRequired()
  176. .HasColumnType("nvarchar(max)");
  177. b.Property<string>("City")
  178. .IsRequired()
  179. .HasColumnType("nvarchar(max)");
  180. b.Property<string>("Country")
  181. .IsRequired()
  182. .HasColumnType("nvarchar(max)");
  183. b.Property<DateTime>("CreatedAtUtc")
  184. .HasColumnType("datetime2");
  185. b.Property<DateTime>("DateOfBirth")
  186. .HasColumnType("datetime2");
  187. b.Property<DateTime?>("DeletedAtUtc")
  188. .HasColumnType("datetime2");
  189. b.Property<string>("Email")
  190. .IsRequired()
  191. .HasColumnType("nvarchar(max)");
  192. b.Property<string>("FirstName")
  193. .IsRequired()
  194. .HasColumnType("nvarchar(max)");
  195. b.Property<long>("InsuranceCompanyId")
  196. .HasColumnType("bigint");
  197. b.Property<string>("LastName")
  198. .IsRequired()
  199. .HasColumnType("nvarchar(max)");
  200. b.Property<string>("PhoneNumber")
  201. .IsRequired()
  202. .HasColumnType("nvarchar(max)");
  203. b.Property<string>("PostalCode")
  204. .IsRequired()
  205. .HasColumnType("nvarchar(max)");
  206. b.Property<DateTime?>("UpdatedAtUtc")
  207. .HasColumnType("datetime2");
  208. b.HasKey("Id");
  209. b.HasIndex("InsuranceCompanyId");
  210. b.ToTable("Insurers");
  211. });
  212. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  213. {
  214. b.Property<int>("Id")
  215. .ValueGeneratedOnAdd()
  216. .HasColumnType("int");
  217. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  218. b.Property<DateTime>("CreationDate")
  219. .HasColumnType("datetime2");
  220. b.Property<DateTime>("ExpiryDate")
  221. .HasColumnType("datetime2");
  222. b.Property<bool>("Invalidated")
  223. .HasColumnType("bit");
  224. b.Property<string>("JwtId")
  225. .IsRequired()
  226. .HasColumnType("nvarchar(max)");
  227. b.Property<string>("Token")
  228. .IsRequired()
  229. .HasColumnType("nvarchar(max)");
  230. b.Property<bool>("Used")
  231. .HasColumnType("bit");
  232. b.Property<int>("UserId")
  233. .HasColumnType("int");
  234. b.HasKey("Id");
  235. b.HasIndex("UserId");
  236. b.ToTable("RefreshTokens");
  237. });
  238. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  239. {
  240. b.Property<int>("TechnologyId")
  241. .ValueGeneratedOnAdd()
  242. .HasColumnType("int");
  243. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TechnologyId"), 1L, 1);
  244. b.Property<string>("Name")
  245. .IsRequired()
  246. .HasMaxLength(128)
  247. .HasColumnType("nvarchar(128)");
  248. b.HasKey("TechnologyId");
  249. b.ToTable("Technologies");
  250. });
  251. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  252. {
  253. b.Property<int>("Id")
  254. .ValueGeneratedOnAdd()
  255. .HasColumnType("int");
  256. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  257. b.Property<int>("AccessFailedCount")
  258. .HasColumnType("int");
  259. b.Property<string>("ConcurrencyStamp")
  260. .IsConcurrencyToken()
  261. .HasColumnType("nvarchar(max)");
  262. b.Property<string>("Email")
  263. .HasMaxLength(256)
  264. .HasColumnType("nvarchar(256)");
  265. b.Property<bool>("EmailConfirmed")
  266. .HasColumnType("bit");
  267. b.Property<string>("FirstName")
  268. .IsRequired()
  269. .HasColumnType("nvarchar(max)");
  270. b.Property<string>("LastName")
  271. .IsRequired()
  272. .HasColumnType("nvarchar(max)");
  273. b.Property<bool>("LockoutEnabled")
  274. .HasColumnType("bit");
  275. b.Property<DateTimeOffset?>("LockoutEnd")
  276. .HasColumnType("datetimeoffset");
  277. b.Property<string>("NormalizedEmail")
  278. .HasMaxLength(256)
  279. .HasColumnType("nvarchar(256)");
  280. b.Property<string>("NormalizedUserName")
  281. .HasMaxLength(256)
  282. .HasColumnType("nvarchar(256)");
  283. b.Property<string>("PasswordHash")
  284. .HasColumnType("nvarchar(max)");
  285. b.Property<string>("PasswordResetToken")
  286. .HasColumnType("nvarchar(max)");
  287. b.Property<string>("PhoneNumber")
  288. .HasColumnType("nvarchar(max)");
  289. b.Property<bool>("PhoneNumberConfirmed")
  290. .HasColumnType("bit");
  291. b.Property<string>("SecurityStamp")
  292. .HasColumnType("nvarchar(max)");
  293. b.Property<bool>("TwoFactorEnabled")
  294. .HasColumnType("bit");
  295. b.Property<string>("UserName")
  296. .HasMaxLength(256)
  297. .HasColumnType("nvarchar(256)");
  298. b.HasKey("Id");
  299. b.HasIndex("NormalizedEmail")
  300. .HasDatabaseName("EmailIndex");
  301. b.HasIndex("NormalizedUserName")
  302. .IsUnique()
  303. .HasDatabaseName("UserNameIndex")
  304. .HasFilter("[NormalizedUserName] IS NOT NULL");
  305. b.ToTable("AspNetUsers", (string)null);
  306. });
  307. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b =>
  308. {
  309. b.Property<long>("Id")
  310. .ValueGeneratedOnAdd()
  311. .HasColumnType("bigint");
  312. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  313. b.Property<DateTime>("CreatedAtUtc")
  314. .HasColumnType("datetime2");
  315. b.Property<DateTime?>("DeletedAtUtc")
  316. .HasColumnType("datetime2");
  317. b.Property<string>("Description")
  318. .IsRequired()
  319. .HasColumnType("nvarchar(max)");
  320. b.Property<string>("DisplayName")
  321. .IsRequired()
  322. .HasMaxLength(100)
  323. .HasColumnType("nvarchar(100)");
  324. b.Property<string>("Name")
  325. .IsRequired()
  326. .HasMaxLength(100)
  327. .HasColumnType("nvarchar(100)");
  328. b.Property<DateTime?>("UpdatedAtUtc")
  329. .HasColumnType("datetime2");
  330. b.HasKey("Id");
  331. b.ToTable("WebhookDefinitions");
  332. });
  333. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  334. {
  335. b.Property<long>("Id")
  336. .ValueGeneratedOnAdd()
  337. .HasColumnType("bigint");
  338. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  339. b.Property<DateTime>("CreatedAtUtc")
  340. .HasColumnType("datetime2");
  341. b.Property<DateTime?>("DeletedAtUtc")
  342. .HasColumnType("datetime2");
  343. b.Property<bool>("IsActive")
  344. .HasColumnType("bit");
  345. b.Property<DateTime?>("UpdatedAtUtc")
  346. .HasColumnType("datetime2");
  347. b.Property<long>("WebhookDefinitionId")
  348. .HasColumnType("bigint");
  349. b.Property<string>("WebhookURL")
  350. .IsRequired()
  351. .HasColumnType("nvarchar(max)");
  352. b.HasKey("Id");
  353. b.HasIndex("WebhookDefinitionId");
  354. b.ToTable("WebhookSubscriptions");
  355. });
  356. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  357. {
  358. b.Property<int>("Id")
  359. .ValueGeneratedOnAdd()
  360. .HasColumnType("int");
  361. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  362. b.Property<string>("ClaimType")
  363. .HasColumnType("nvarchar(max)");
  364. b.Property<string>("ClaimValue")
  365. .HasColumnType("nvarchar(max)");
  366. b.Property<int>("RoleId")
  367. .HasColumnType("int");
  368. b.HasKey("Id");
  369. b.HasIndex("RoleId");
  370. b.ToTable("AspNetRoleClaims", (string)null);
  371. });
  372. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  373. {
  374. b.Property<int>("Id")
  375. .ValueGeneratedOnAdd()
  376. .HasColumnType("int");
  377. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  378. b.Property<string>("ClaimType")
  379. .HasColumnType("nvarchar(max)");
  380. b.Property<string>("ClaimValue")
  381. .HasColumnType("nvarchar(max)");
  382. b.Property<int>("UserId")
  383. .HasColumnType("int");
  384. b.HasKey("Id");
  385. b.HasIndex("UserId");
  386. b.ToTable("AspNetUserClaims", (string)null);
  387. });
  388. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  389. {
  390. b.Property<string>("LoginProvider")
  391. .HasColumnType("nvarchar(450)");
  392. b.Property<string>("ProviderKey")
  393. .HasColumnType("nvarchar(450)");
  394. b.Property<string>("ProviderDisplayName")
  395. .HasColumnType("nvarchar(max)");
  396. b.Property<int>("UserId")
  397. .HasColumnType("int");
  398. b.HasKey("LoginProvider", "ProviderKey");
  399. b.HasIndex("UserId");
  400. b.ToTable("AspNetUserLogins", (string)null);
  401. });
  402. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  403. {
  404. b.Property<int>("UserId")
  405. .HasColumnType("int");
  406. b.Property<int>("RoleId")
  407. .HasColumnType("int");
  408. b.HasKey("UserId", "RoleId");
  409. b.HasIndex("RoleId");
  410. b.ToTable("AspNetUserRoles", (string)null);
  411. });
  412. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  413. {
  414. b.Property<int>("UserId")
  415. .HasColumnType("int");
  416. b.Property<string>("LoginProvider")
  417. .HasColumnType("nvarchar(450)");
  418. b.Property<string>("Name")
  419. .HasColumnType("nvarchar(450)");
  420. b.Property<string>("Value")
  421. .HasColumnType("nvarchar(max)");
  422. b.HasKey("UserId", "LoginProvider", "Name");
  423. b.ToTable("AspNetUserTokens", (string)null);
  424. });
  425. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.ApplicantTechnology", b =>
  426. {
  427. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  428. .WithMany()
  429. .HasForeignKey("ApplicantId")
  430. .OnDelete(DeleteBehavior.Cascade)
  431. .IsRequired();
  432. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Tecnology")
  433. .WithMany()
  434. .HasForeignKey("TechnologyId")
  435. .OnDelete(DeleteBehavior.Cascade)
  436. .IsRequired();
  437. b.Navigation("Applicant");
  438. b.Navigation("Tecnology");
  439. });
  440. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  441. {
  442. b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer")
  443. .WithMany()
  444. .HasForeignKey("InsurerId")
  445. .OnDelete(DeleteBehavior.Cascade)
  446. .IsRequired();
  447. b.Navigation("Insurer");
  448. });
  449. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  450. {
  451. b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany")
  452. .WithMany()
  453. .HasForeignKey("InsuranceCompanyId")
  454. .OnDelete(DeleteBehavior.Cascade)
  455. .IsRequired();
  456. b.Navigation("InsuranceCompany");
  457. });
  458. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  459. {
  460. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  461. .WithMany()
  462. .HasForeignKey("UserId")
  463. .OnDelete(DeleteBehavior.Cascade)
  464. .IsRequired();
  465. b.Navigation("User");
  466. });
  467. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  468. {
  469. b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition")
  470. .WithMany()
  471. .HasForeignKey("WebhookDefinitionId")
  472. .OnDelete(DeleteBehavior.Cascade)
  473. .IsRequired();
  474. b.Navigation("WebhookDefinition");
  475. });
  476. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  477. {
  478. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  479. .WithMany()
  480. .HasForeignKey("RoleId")
  481. .OnDelete(DeleteBehavior.Cascade)
  482. .IsRequired();
  483. });
  484. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  485. {
  486. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  487. .WithMany()
  488. .HasForeignKey("UserId")
  489. .OnDelete(DeleteBehavior.Cascade)
  490. .IsRequired();
  491. });
  492. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  493. {
  494. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  495. .WithMany()
  496. .HasForeignKey("UserId")
  497. .OnDelete(DeleteBehavior.Cascade)
  498. .IsRequired();
  499. });
  500. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  501. {
  502. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  503. .WithMany()
  504. .HasForeignKey("RoleId")
  505. .OnDelete(DeleteBehavior.Cascade)
  506. .IsRequired();
  507. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  508. .WithMany()
  509. .HasForeignKey("UserId")
  510. .OnDelete(DeleteBehavior.Cascade)
  511. .IsRequired();
  512. });
  513. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  514. {
  515. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  516. .WithMany()
  517. .HasForeignKey("UserId")
  518. .OnDelete(DeleteBehavior.Cascade)
  519. .IsRequired();
  520. });
  521. #pragma warning restore 612, 618
  522. }
  523. }
  524. }