Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

20221103144335_AddedAd.Designer.cs 28KB

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