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

DatabaseContextModelSnapshot.cs 30KB

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