Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

20221124125727_RestrictDelete.Designer.cs 36KB

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