Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

DatabaseContextModelSnapshot.cs 38KB

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