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 32KB

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