Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

20221109080857_EnabledUser.Designer.cs 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  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("20221109080857_EnabledUser")]
  14. partial class EnabledUser
  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.AppRole", b =>
  105. {
  106. b.Property<int>("Id")
  107. .ValueGeneratedOnAdd()
  108. .HasColumnType("int");
  109. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  110. b.Property<string>("ConcurrencyStamp")
  111. .IsConcurrencyToken()
  112. .HasColumnType("nvarchar(max)");
  113. b.Property<string>("Name")
  114. .HasMaxLength(256)
  115. .HasColumnType("nvarchar(256)");
  116. b.Property<string>("NormalizedName")
  117. .HasMaxLength(256)
  118. .HasColumnType("nvarchar(256)");
  119. b.HasKey("Id");
  120. b.HasIndex("NormalizedName")
  121. .IsUnique()
  122. .HasDatabaseName("RoleNameIndex")
  123. .HasFilter("[NormalizedName] IS NOT NULL");
  124. b.ToTable("AspNetRoles", (string)null);
  125. });
  126. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Comment", b =>
  127. {
  128. b.Property<int>("Id")
  129. .ValueGeneratedOnAdd()
  130. .HasColumnType("int");
  131. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  132. b.Property<int>("ApplicantId")
  133. .HasColumnType("int");
  134. b.Property<string>("Content")
  135. .IsRequired()
  136. .HasMaxLength(1024)
  137. .HasColumnType("nvarchar(1024)");
  138. b.Property<DateTime>("DateOfSending")
  139. .HasColumnType("datetime2");
  140. b.Property<int>("UserId")
  141. .HasColumnType("int");
  142. b.HasKey("Id");
  143. b.HasIndex("ApplicantId");
  144. b.HasIndex("UserId");
  145. b.ToTable("Comments");
  146. });
  147. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b =>
  148. {
  149. b.Property<long>("Id")
  150. .ValueGeneratedOnAdd()
  151. .HasColumnType("bigint");
  152. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  153. b.Property<string>("City")
  154. .IsRequired()
  155. .HasColumnType("nvarchar(max)");
  156. b.Property<string>("Country")
  157. .IsRequired()
  158. .HasColumnType("nvarchar(max)");
  159. b.Property<DateTime>("CreatedAtUtc")
  160. .HasColumnType("datetime2");
  161. b.Property<DateTime?>("DeletedAtUtc")
  162. .HasColumnType("datetime2");
  163. b.Property<string>("Fax")
  164. .IsRequired()
  165. .HasColumnType("nvarchar(max)");
  166. b.Property<string>("LegalAddress")
  167. .IsRequired()
  168. .HasColumnType("nvarchar(max)");
  169. b.Property<string>("LegalEmail")
  170. .IsRequired()
  171. .HasColumnType("nvarchar(max)");
  172. b.Property<string>("Name")
  173. .IsRequired()
  174. .HasColumnType("nvarchar(max)");
  175. b.Property<string>("PhoneNumber")
  176. .IsRequired()
  177. .HasColumnType("nvarchar(max)");
  178. b.Property<string>("PostalCode")
  179. .IsRequired()
  180. .HasColumnType("nvarchar(max)");
  181. b.Property<DateTime?>("UpdatedAtUtc")
  182. .HasColumnType("datetime2");
  183. b.HasKey("Id");
  184. b.ToTable("InsuranceCompanies");
  185. });
  186. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  187. {
  188. b.Property<long>("Id")
  189. .ValueGeneratedOnAdd()
  190. .HasColumnType("bigint");
  191. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  192. b.Property<DateTime>("CreatedAtUtc")
  193. .HasColumnType("datetime2");
  194. b.Property<DateTime?>("DeletedAtUtc")
  195. .HasColumnType("datetime2");
  196. b.Property<DateTime>("EndDate")
  197. .HasColumnType("datetime2");
  198. b.Property<long>("InsurerId")
  199. .HasColumnType("bigint");
  200. b.Property<decimal>("Premium")
  201. .HasColumnType("decimal(18,2)");
  202. b.Property<DateTime>("StartDate")
  203. .HasColumnType("datetime2");
  204. b.Property<string>("Type")
  205. .IsRequired()
  206. .HasColumnType("nvarchar(max)");
  207. b.Property<DateTime?>("UpdatedAtUtc")
  208. .HasColumnType("datetime2");
  209. b.HasKey("Id");
  210. b.HasIndex("InsurerId");
  211. b.ToTable("InsurancePolicies");
  212. });
  213. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  214. {
  215. b.Property<long>("Id")
  216. .ValueGeneratedOnAdd()
  217. .HasColumnType("bigint");
  218. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  219. b.Property<string>("Address")
  220. .IsRequired()
  221. .HasColumnType("nvarchar(max)");
  222. b.Property<string>("City")
  223. .IsRequired()
  224. .HasColumnType("nvarchar(max)");
  225. b.Property<string>("Country")
  226. .IsRequired()
  227. .HasColumnType("nvarchar(max)");
  228. b.Property<DateTime>("CreatedAtUtc")
  229. .HasColumnType("datetime2");
  230. b.Property<DateTime>("DateOfBirth")
  231. .HasColumnType("datetime2");
  232. b.Property<DateTime?>("DeletedAtUtc")
  233. .HasColumnType("datetime2");
  234. b.Property<string>("Email")
  235. .IsRequired()
  236. .HasColumnType("nvarchar(max)");
  237. b.Property<string>("FirstName")
  238. .IsRequired()
  239. .HasColumnType("nvarchar(max)");
  240. b.Property<long>("InsuranceCompanyId")
  241. .HasColumnType("bigint");
  242. b.Property<string>("LastName")
  243. .IsRequired()
  244. .HasColumnType("nvarchar(max)");
  245. b.Property<string>("PhoneNumber")
  246. .IsRequired()
  247. .HasColumnType("nvarchar(max)");
  248. b.Property<string>("PostalCode")
  249. .IsRequired()
  250. .HasColumnType("nvarchar(max)");
  251. b.Property<DateTime?>("UpdatedAtUtc")
  252. .HasColumnType("datetime2");
  253. b.HasKey("Id");
  254. b.HasIndex("InsuranceCompanyId");
  255. b.ToTable("Insurers");
  256. });
  257. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  258. {
  259. b.Property<int>("Id")
  260. .ValueGeneratedOnAdd()
  261. .HasColumnType("int");
  262. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  263. b.Property<DateTime>("CreationDate")
  264. .HasColumnType("datetime2");
  265. b.Property<DateTime>("ExpiryDate")
  266. .HasColumnType("datetime2");
  267. b.Property<bool>("Invalidated")
  268. .HasColumnType("bit");
  269. b.Property<string>("JwtId")
  270. .IsRequired()
  271. .HasColumnType("nvarchar(max)");
  272. b.Property<string>("Token")
  273. .IsRequired()
  274. .HasColumnType("nvarchar(max)");
  275. b.Property<bool>("Used")
  276. .HasColumnType("bit");
  277. b.Property<int>("UserId")
  278. .HasColumnType("int");
  279. b.HasKey("Id");
  280. b.HasIndex("UserId");
  281. b.ToTable("RefreshTokens");
  282. });
  283. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  284. {
  285. b.Property<int>("TechnologyId")
  286. .ValueGeneratedOnAdd()
  287. .HasColumnType("int");
  288. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TechnologyId"), 1L, 1);
  289. b.Property<string>("Name")
  290. .IsRequired()
  291. .HasMaxLength(128)
  292. .HasColumnType("nvarchar(128)");
  293. b.HasKey("TechnologyId");
  294. b.ToTable("Technologies");
  295. });
  296. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  297. {
  298. b.Property<int>("Id")
  299. .ValueGeneratedOnAdd()
  300. .HasColumnType("int");
  301. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  302. b.Property<int>("ApplicantId")
  303. .HasColumnType("int");
  304. b.Property<int>("TechnologyId")
  305. .HasColumnType("int");
  306. b.HasKey("Id");
  307. b.HasIndex("ApplicantId");
  308. b.HasIndex("TechnologyId");
  309. b.ToTable("ApplicantTechnologies");
  310. });
  311. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  312. {
  313. b.Property<int>("Id")
  314. .ValueGeneratedOnAdd()
  315. .HasColumnType("int");
  316. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  317. b.Property<int>("AccessFailedCount")
  318. .HasColumnType("int");
  319. b.Property<string>("ConcurrencyStamp")
  320. .IsConcurrencyToken()
  321. .HasColumnType("nvarchar(max)");
  322. b.Property<string>("Email")
  323. .HasMaxLength(256)
  324. .HasColumnType("nvarchar(256)");
  325. b.Property<bool>("EmailConfirmed")
  326. .HasColumnType("bit");
  327. b.Property<string>("FirstName")
  328. .IsRequired()
  329. .HasColumnType("nvarchar(max)");
  330. b.Property<bool>("IsEnabled")
  331. .ValueGeneratedOnAdd()
  332. .HasColumnType("bit")
  333. .HasDefaultValue(true);
  334. b.Property<string>("LastName")
  335. .IsRequired()
  336. .HasColumnType("nvarchar(max)");
  337. b.Property<bool>("LockoutEnabled")
  338. .HasColumnType("bit");
  339. b.Property<DateTimeOffset?>("LockoutEnd")
  340. .HasColumnType("datetimeoffset");
  341. b.Property<string>("NormalizedEmail")
  342. .HasMaxLength(256)
  343. .HasColumnType("nvarchar(256)");
  344. b.Property<string>("NormalizedUserName")
  345. .HasMaxLength(256)
  346. .HasColumnType("nvarchar(256)");
  347. b.Property<string>("PasswordHash")
  348. .HasColumnType("nvarchar(max)");
  349. b.Property<string>("PasswordResetToken")
  350. .HasColumnType("nvarchar(max)");
  351. b.Property<string>("PhoneNumber")
  352. .HasColumnType("nvarchar(max)");
  353. b.Property<bool>("PhoneNumberConfirmed")
  354. .HasColumnType("bit");
  355. b.Property<string>("SecurityStamp")
  356. .HasColumnType("nvarchar(max)");
  357. b.Property<bool>("TwoFactorEnabled")
  358. .HasColumnType("bit");
  359. b.Property<string>("UserName")
  360. .HasMaxLength(256)
  361. .HasColumnType("nvarchar(256)");
  362. b.HasKey("Id");
  363. b.HasIndex("NormalizedEmail")
  364. .HasDatabaseName("EmailIndex");
  365. b.HasIndex("NormalizedUserName")
  366. .IsUnique()
  367. .HasDatabaseName("UserNameIndex")
  368. .HasFilter("[NormalizedUserName] IS NOT NULL");
  369. b.ToTable("AspNetUsers", (string)null);
  370. });
  371. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b =>
  372. {
  373. b.Property<long>("Id")
  374. .ValueGeneratedOnAdd()
  375. .HasColumnType("bigint");
  376. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  377. b.Property<DateTime>("CreatedAtUtc")
  378. .HasColumnType("datetime2");
  379. b.Property<DateTime?>("DeletedAtUtc")
  380. .HasColumnType("datetime2");
  381. b.Property<string>("Description")
  382. .IsRequired()
  383. .HasColumnType("nvarchar(max)");
  384. b.Property<string>("DisplayName")
  385. .IsRequired()
  386. .HasMaxLength(100)
  387. .HasColumnType("nvarchar(100)");
  388. b.Property<string>("Name")
  389. .IsRequired()
  390. .HasMaxLength(100)
  391. .HasColumnType("nvarchar(100)");
  392. b.Property<DateTime?>("UpdatedAtUtc")
  393. .HasColumnType("datetime2");
  394. b.HasKey("Id");
  395. b.ToTable("WebhookDefinitions");
  396. });
  397. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  398. {
  399. b.Property<long>("Id")
  400. .ValueGeneratedOnAdd()
  401. .HasColumnType("bigint");
  402. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  403. b.Property<DateTime>("CreatedAtUtc")
  404. .HasColumnType("datetime2");
  405. b.Property<DateTime?>("DeletedAtUtc")
  406. .HasColumnType("datetime2");
  407. b.Property<bool>("IsActive")
  408. .HasColumnType("bit");
  409. b.Property<DateTime?>("UpdatedAtUtc")
  410. .HasColumnType("datetime2");
  411. b.Property<long>("WebhookDefinitionId")
  412. .HasColumnType("bigint");
  413. b.Property<string>("WebhookURL")
  414. .IsRequired()
  415. .HasColumnType("nvarchar(max)");
  416. b.HasKey("Id");
  417. b.HasIndex("WebhookDefinitionId");
  418. b.ToTable("WebhookSubscriptions");
  419. });
  420. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  421. {
  422. b.Property<int>("Id")
  423. .ValueGeneratedOnAdd()
  424. .HasColumnType("int");
  425. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  426. b.Property<string>("ClaimType")
  427. .HasColumnType("nvarchar(max)");
  428. b.Property<string>("ClaimValue")
  429. .HasColumnType("nvarchar(max)");
  430. b.Property<int>("RoleId")
  431. .HasColumnType("int");
  432. b.HasKey("Id");
  433. b.HasIndex("RoleId");
  434. b.ToTable("AspNetRoleClaims", (string)null);
  435. });
  436. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  437. {
  438. b.Property<int>("Id")
  439. .ValueGeneratedOnAdd()
  440. .HasColumnType("int");
  441. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  442. b.Property<string>("ClaimType")
  443. .HasColumnType("nvarchar(max)");
  444. b.Property<string>("ClaimValue")
  445. .HasColumnType("nvarchar(max)");
  446. b.Property<int>("UserId")
  447. .HasColumnType("int");
  448. b.HasKey("Id");
  449. b.HasIndex("UserId");
  450. b.ToTable("AspNetUserClaims", (string)null);
  451. });
  452. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  453. {
  454. b.Property<string>("LoginProvider")
  455. .HasColumnType("nvarchar(450)");
  456. b.Property<string>("ProviderKey")
  457. .HasColumnType("nvarchar(450)");
  458. b.Property<string>("ProviderDisplayName")
  459. .HasColumnType("nvarchar(max)");
  460. b.Property<int>("UserId")
  461. .HasColumnType("int");
  462. b.HasKey("LoginProvider", "ProviderKey");
  463. b.HasIndex("UserId");
  464. b.ToTable("AspNetUserLogins", (string)null);
  465. });
  466. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  467. {
  468. b.Property<int>("UserId")
  469. .HasColumnType("int");
  470. b.Property<int>("RoleId")
  471. .HasColumnType("int");
  472. b.HasKey("UserId", "RoleId");
  473. b.HasIndex("RoleId");
  474. b.ToTable("AspNetUserRoles", (string)null);
  475. });
  476. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  477. {
  478. b.Property<int>("UserId")
  479. .HasColumnType("int");
  480. b.Property<string>("LoginProvider")
  481. .HasColumnType("nvarchar(450)");
  482. b.Property<string>("Name")
  483. .HasColumnType("nvarchar(450)");
  484. b.Property<string>("Value")
  485. .HasColumnType("nvarchar(max)");
  486. b.HasKey("UserId", "LoginProvider", "Name");
  487. b.ToTable("AspNetUserTokens", (string)null);
  488. });
  489. modelBuilder.Entity("AdTechnology", b =>
  490. {
  491. b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null)
  492. .WithMany()
  493. .HasForeignKey("AdsId")
  494. .OnDelete(DeleteBehavior.Cascade)
  495. .IsRequired();
  496. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", null)
  497. .WithMany()
  498. .HasForeignKey("TechnologiesTechnologyId")
  499. .OnDelete(DeleteBehavior.Cascade)
  500. .IsRequired();
  501. });
  502. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Comment", b =>
  503. {
  504. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  505. .WithMany("Comments")
  506. .HasForeignKey("ApplicantId")
  507. .OnDelete(DeleteBehavior.Cascade)
  508. .IsRequired();
  509. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  510. .WithMany("Comments")
  511. .HasForeignKey("UserId")
  512. .OnDelete(DeleteBehavior.Cascade)
  513. .IsRequired();
  514. b.Navigation("Applicant");
  515. b.Navigation("User");
  516. });
  517. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  518. {
  519. b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer")
  520. .WithMany()
  521. .HasForeignKey("InsurerId")
  522. .OnDelete(DeleteBehavior.Cascade)
  523. .IsRequired();
  524. b.Navigation("Insurer");
  525. });
  526. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  527. {
  528. b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany")
  529. .WithMany()
  530. .HasForeignKey("InsuranceCompanyId")
  531. .OnDelete(DeleteBehavior.Cascade)
  532. .IsRequired();
  533. b.Navigation("InsuranceCompany");
  534. });
  535. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  536. {
  537. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  538. .WithMany()
  539. .HasForeignKey("UserId")
  540. .OnDelete(DeleteBehavior.Cascade)
  541. .IsRequired();
  542. b.Navigation("User");
  543. });
  544. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  545. {
  546. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  547. .WithMany("TechnologyApplicants")
  548. .HasForeignKey("ApplicantId")
  549. .OnDelete(DeleteBehavior.Cascade)
  550. .IsRequired();
  551. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Technology")
  552. .WithMany("TechnologyApplicants")
  553. .HasForeignKey("TechnologyId")
  554. .OnDelete(DeleteBehavior.Cascade)
  555. .IsRequired();
  556. b.Navigation("Applicant");
  557. b.Navigation("Technology");
  558. });
  559. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  560. {
  561. b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition")
  562. .WithMany()
  563. .HasForeignKey("WebhookDefinitionId")
  564. .OnDelete(DeleteBehavior.Cascade)
  565. .IsRequired();
  566. b.Navigation("WebhookDefinition");
  567. });
  568. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  569. {
  570. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  571. .WithMany()
  572. .HasForeignKey("RoleId")
  573. .OnDelete(DeleteBehavior.Cascade)
  574. .IsRequired();
  575. });
  576. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  577. {
  578. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  579. .WithMany()
  580. .HasForeignKey("UserId")
  581. .OnDelete(DeleteBehavior.Cascade)
  582. .IsRequired();
  583. });
  584. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  585. {
  586. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  587. .WithMany()
  588. .HasForeignKey("UserId")
  589. .OnDelete(DeleteBehavior.Cascade)
  590. .IsRequired();
  591. });
  592. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  593. {
  594. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  595. .WithMany()
  596. .HasForeignKey("RoleId")
  597. .OnDelete(DeleteBehavior.Cascade)
  598. .IsRequired();
  599. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  600. .WithMany()
  601. .HasForeignKey("UserId")
  602. .OnDelete(DeleteBehavior.Cascade)
  603. .IsRequired();
  604. });
  605. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  606. {
  607. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  608. .WithMany()
  609. .HasForeignKey("UserId")
  610. .OnDelete(DeleteBehavior.Cascade)
  611. .IsRequired();
  612. });
  613. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b =>
  614. {
  615. b.Navigation("Comments");
  616. b.Navigation("TechnologyApplicants");
  617. });
  618. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  619. {
  620. b.Navigation("TechnologyApplicants");
  621. });
  622. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  623. {
  624. b.Navigation("Comments");
  625. });
  626. #pragma warning restore 612, 618
  627. }
  628. }
  629. }