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

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