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

DatabaseContextModelSnapshot.cs 38KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  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<string>("Comment")
  362. .HasColumnType("nvarchar(max)");
  363. b.Property<DateTime?>("Date")
  364. .HasColumnType("datetime2");
  365. b.Property<string>("Link")
  366. .HasColumnType("nvarchar(max)");
  367. b.Property<string>("Name")
  368. .IsRequired()
  369. .HasColumnType("nvarchar(max)");
  370. b.Property<int?>("SchedulerId")
  371. .HasColumnType("int");
  372. b.Property<int>("SelectionLevelId")
  373. .HasColumnType("int");
  374. b.Property<string>("Status")
  375. .IsRequired()
  376. .HasColumnType("nvarchar(max)");
  377. b.HasKey("Id");
  378. b.HasIndex("ApplicantId");
  379. b.HasIndex("SchedulerId");
  380. b.HasIndex("SelectionLevelId");
  381. b.ToTable("SelectionProcesses");
  382. });
  383. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  384. {
  385. b.Property<int>("TechnologyId")
  386. .ValueGeneratedOnAdd()
  387. .HasColumnType("int");
  388. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TechnologyId"), 1L, 1);
  389. b.Property<string>("Name")
  390. .IsRequired()
  391. .HasMaxLength(128)
  392. .HasColumnType("nvarchar(128)");
  393. b.Property<string>("TechnologyType")
  394. .IsRequired()
  395. .HasColumnType("nvarchar(max)");
  396. b.HasKey("TechnologyId");
  397. b.ToTable("Technologies");
  398. });
  399. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  400. {
  401. b.Property<int>("Id")
  402. .ValueGeneratedOnAdd()
  403. .HasColumnType("int");
  404. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  405. b.Property<int>("ApplicantId")
  406. .HasColumnType("int");
  407. b.Property<int>("TechnologyId")
  408. .HasColumnType("int");
  409. b.HasKey("Id");
  410. b.HasIndex("ApplicantId");
  411. b.HasIndex("TechnologyId");
  412. b.ToTable("ApplicantTechnologies");
  413. });
  414. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  415. {
  416. b.Property<int>("Id")
  417. .ValueGeneratedOnAdd()
  418. .HasColumnType("int");
  419. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  420. b.Property<int>("AccessFailedCount")
  421. .HasColumnType("int");
  422. b.Property<string>("ConcurrencyStamp")
  423. .IsConcurrencyToken()
  424. .HasColumnType("nvarchar(max)");
  425. b.Property<string>("Email")
  426. .HasMaxLength(256)
  427. .HasColumnType("nvarchar(256)");
  428. b.Property<bool>("EmailConfirmed")
  429. .HasColumnType("bit");
  430. b.Property<string>("FirstName")
  431. .IsRequired()
  432. .HasColumnType("nvarchar(max)");
  433. b.Property<bool?>("IsEnabled")
  434. .ValueGeneratedOnAdd()
  435. .HasColumnType("bit")
  436. .HasDefaultValue(true);
  437. b.Property<string>("LastName")
  438. .IsRequired()
  439. .HasColumnType("nvarchar(max)");
  440. b.Property<string>("LinkedIn")
  441. .HasColumnType("nvarchar(max)");
  442. b.Property<bool>("LockoutEnabled")
  443. .HasColumnType("bit");
  444. b.Property<DateTimeOffset?>("LockoutEnd")
  445. .HasColumnType("datetimeoffset");
  446. b.Property<string>("NormalizedEmail")
  447. .HasMaxLength(256)
  448. .HasColumnType("nvarchar(256)");
  449. b.Property<string>("NormalizedUserName")
  450. .HasMaxLength(256)
  451. .HasColumnType("nvarchar(256)");
  452. b.Property<string>("PasswordHash")
  453. .HasColumnType("nvarchar(max)");
  454. b.Property<string>("PhoneNumber")
  455. .HasColumnType("nvarchar(max)");
  456. b.Property<bool>("PhoneNumberConfirmed")
  457. .HasColumnType("bit");
  458. b.Property<string>("Position")
  459. .HasColumnType("nvarchar(max)");
  460. b.Property<string>("SecurityStamp")
  461. .HasColumnType("nvarchar(max)");
  462. b.Property<bool>("TwoFactorEnabled")
  463. .HasColumnType("bit");
  464. b.Property<string>("UserName")
  465. .HasMaxLength(256)
  466. .HasColumnType("nvarchar(256)");
  467. b.HasKey("Id");
  468. b.HasIndex("NormalizedEmail")
  469. .HasDatabaseName("EmailIndex");
  470. b.HasIndex("NormalizedUserName")
  471. .IsUnique()
  472. .HasDatabaseName("UserNameIndex")
  473. .HasFilter("[NormalizedUserName] IS NOT NULL");
  474. b.ToTable("AspNetUsers", (string)null);
  475. });
  476. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b =>
  477. {
  478. b.Property<long>("Id")
  479. .ValueGeneratedOnAdd()
  480. .HasColumnType("bigint");
  481. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  482. b.Property<DateTime>("CreatedAtUtc")
  483. .HasColumnType("datetime2");
  484. b.Property<DateTime?>("DeletedAtUtc")
  485. .HasColumnType("datetime2");
  486. b.Property<string>("Description")
  487. .IsRequired()
  488. .HasColumnType("nvarchar(max)");
  489. b.Property<string>("DisplayName")
  490. .IsRequired()
  491. .HasMaxLength(100)
  492. .HasColumnType("nvarchar(100)");
  493. b.Property<string>("Name")
  494. .IsRequired()
  495. .HasMaxLength(100)
  496. .HasColumnType("nvarchar(100)");
  497. b.Property<DateTime?>("UpdatedAtUtc")
  498. .HasColumnType("datetime2");
  499. b.HasKey("Id");
  500. b.ToTable("WebhookDefinitions");
  501. });
  502. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  503. {
  504. b.Property<long>("Id")
  505. .ValueGeneratedOnAdd()
  506. .HasColumnType("bigint");
  507. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  508. b.Property<DateTime>("CreatedAtUtc")
  509. .HasColumnType("datetime2");
  510. b.Property<DateTime?>("DeletedAtUtc")
  511. .HasColumnType("datetime2");
  512. b.Property<bool>("IsActive")
  513. .HasColumnType("bit");
  514. b.Property<DateTime?>("UpdatedAtUtc")
  515. .HasColumnType("datetime2");
  516. b.Property<long>("WebhookDefinitionId")
  517. .HasColumnType("bigint");
  518. b.Property<string>("WebhookURL")
  519. .IsRequired()
  520. .HasColumnType("nvarchar(max)");
  521. b.HasKey("Id");
  522. b.HasIndex("WebhookDefinitionId");
  523. b.ToTable("WebhookSubscriptions");
  524. });
  525. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  526. {
  527. b.Property<int>("Id")
  528. .ValueGeneratedOnAdd()
  529. .HasColumnType("int");
  530. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  531. b.Property<string>("ClaimType")
  532. .HasColumnType("nvarchar(max)");
  533. b.Property<string>("ClaimValue")
  534. .HasColumnType("nvarchar(max)");
  535. b.Property<int>("RoleId")
  536. .HasColumnType("int");
  537. b.HasKey("Id");
  538. b.HasIndex("RoleId");
  539. b.ToTable("AspNetRoleClaims", (string)null);
  540. });
  541. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  542. {
  543. b.Property<int>("Id")
  544. .ValueGeneratedOnAdd()
  545. .HasColumnType("int");
  546. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  547. b.Property<string>("ClaimType")
  548. .HasColumnType("nvarchar(max)");
  549. b.Property<string>("ClaimValue")
  550. .HasColumnType("nvarchar(max)");
  551. b.Property<int>("UserId")
  552. .HasColumnType("int");
  553. b.HasKey("Id");
  554. b.HasIndex("UserId");
  555. b.ToTable("AspNetUserClaims", (string)null);
  556. });
  557. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  558. {
  559. b.Property<string>("LoginProvider")
  560. .HasColumnType("nvarchar(450)");
  561. b.Property<string>("ProviderKey")
  562. .HasColumnType("nvarchar(450)");
  563. b.Property<string>("ProviderDisplayName")
  564. .HasColumnType("nvarchar(max)");
  565. b.Property<int>("UserId")
  566. .HasColumnType("int");
  567. b.HasKey("LoginProvider", "ProviderKey");
  568. b.HasIndex("UserId");
  569. b.ToTable("AspNetUserLogins", (string)null);
  570. });
  571. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  572. {
  573. b.Property<int>("UserId")
  574. .HasColumnType("int");
  575. b.Property<int>("RoleId")
  576. .HasColumnType("int");
  577. b.HasKey("UserId", "RoleId");
  578. b.HasIndex("RoleId");
  579. b.ToTable("AspNetUserRoles", (string)null);
  580. });
  581. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  582. {
  583. b.Property<int>("UserId")
  584. .HasColumnType("int");
  585. b.Property<string>("LoginProvider")
  586. .HasColumnType("nvarchar(450)");
  587. b.Property<string>("Name")
  588. .HasColumnType("nvarchar(450)");
  589. b.Property<string>("Value")
  590. .HasColumnType("nvarchar(max)");
  591. b.HasKey("UserId", "LoginProvider", "Name");
  592. b.ToTable("AspNetUserTokens", (string)null);
  593. });
  594. modelBuilder.Entity("AdApplicant", b =>
  595. {
  596. b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null)
  597. .WithMany()
  598. .HasForeignKey("AdsId")
  599. .OnDelete(DeleteBehavior.Cascade)
  600. .IsRequired();
  601. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", null)
  602. .WithMany()
  603. .HasForeignKey("ApplicantsApplicantId")
  604. .OnDelete(DeleteBehavior.Cascade)
  605. .IsRequired();
  606. });
  607. modelBuilder.Entity("AdTechnology", b =>
  608. {
  609. b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null)
  610. .WithMany()
  611. .HasForeignKey("AdsId")
  612. .OnDelete(DeleteBehavior.Cascade)
  613. .IsRequired();
  614. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", null)
  615. .WithMany()
  616. .HasForeignKey("TechnologiesTechnologyId")
  617. .OnDelete(DeleteBehavior.Cascade)
  618. .IsRequired();
  619. });
  620. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Comment", b =>
  621. {
  622. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  623. .WithMany("Comments")
  624. .HasForeignKey("ApplicantId")
  625. .OnDelete(DeleteBehavior.Cascade)
  626. .IsRequired();
  627. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  628. .WithMany("Comments")
  629. .HasForeignKey("UserId")
  630. .OnDelete(DeleteBehavior.Cascade)
  631. .IsRequired();
  632. b.Navigation("Applicant");
  633. b.Navigation("User");
  634. });
  635. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  636. {
  637. b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer")
  638. .WithMany()
  639. .HasForeignKey("InsurerId")
  640. .OnDelete(DeleteBehavior.Cascade)
  641. .IsRequired();
  642. b.Navigation("Insurer");
  643. });
  644. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  645. {
  646. b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany")
  647. .WithMany()
  648. .HasForeignKey("InsuranceCompanyId")
  649. .OnDelete(DeleteBehavior.Cascade)
  650. .IsRequired();
  651. b.Navigation("InsuranceCompany");
  652. });
  653. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Pattern", b =>
  654. {
  655. b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel")
  656. .WithMany()
  657. .HasForeignKey("SelectionLevelId")
  658. .OnDelete(DeleteBehavior.Cascade)
  659. .IsRequired();
  660. b.Navigation("SelectionLevel");
  661. });
  662. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  663. {
  664. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  665. .WithMany()
  666. .HasForeignKey("UserId")
  667. .OnDelete(DeleteBehavior.Cascade)
  668. .IsRequired();
  669. b.Navigation("User");
  670. });
  671. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b =>
  672. {
  673. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  674. .WithMany("SelectionProcesses")
  675. .HasForeignKey("ApplicantId")
  676. .OnDelete(DeleteBehavior.Cascade)
  677. .IsRequired();
  678. b.HasOne("Diligent.WebAPI.Data.Entities.User", "Scheduler")
  679. .WithMany("Processes")
  680. .HasForeignKey("SchedulerId")
  681. .OnDelete(DeleteBehavior.SetNull);
  682. b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel")
  683. .WithMany("SelectionProcesses")
  684. .HasForeignKey("SelectionLevelId")
  685. .OnDelete(DeleteBehavior.Cascade)
  686. .IsRequired();
  687. b.Navigation("Applicant");
  688. b.Navigation("Scheduler");
  689. b.Navigation("SelectionLevel");
  690. });
  691. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  692. {
  693. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  694. .WithMany("TechnologyApplicants")
  695. .HasForeignKey("ApplicantId")
  696. .OnDelete(DeleteBehavior.Cascade)
  697. .IsRequired();
  698. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Technology")
  699. .WithMany("TechnologyApplicants")
  700. .HasForeignKey("TechnologyId")
  701. .OnDelete(DeleteBehavior.Cascade)
  702. .IsRequired();
  703. b.Navigation("Applicant");
  704. b.Navigation("Technology");
  705. });
  706. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  707. {
  708. b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition")
  709. .WithMany()
  710. .HasForeignKey("WebhookDefinitionId")
  711. .OnDelete(DeleteBehavior.Cascade)
  712. .IsRequired();
  713. b.Navigation("WebhookDefinition");
  714. });
  715. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  716. {
  717. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  718. .WithMany()
  719. .HasForeignKey("RoleId")
  720. .OnDelete(DeleteBehavior.Cascade)
  721. .IsRequired();
  722. });
  723. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  724. {
  725. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  726. .WithMany()
  727. .HasForeignKey("UserId")
  728. .OnDelete(DeleteBehavior.Cascade)
  729. .IsRequired();
  730. });
  731. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  732. {
  733. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  734. .WithMany()
  735. .HasForeignKey("UserId")
  736. .OnDelete(DeleteBehavior.Cascade)
  737. .IsRequired();
  738. });
  739. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  740. {
  741. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  742. .WithMany()
  743. .HasForeignKey("RoleId")
  744. .OnDelete(DeleteBehavior.Cascade)
  745. .IsRequired();
  746. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  747. .WithMany()
  748. .HasForeignKey("UserId")
  749. .OnDelete(DeleteBehavior.Cascade)
  750. .IsRequired();
  751. });
  752. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  753. {
  754. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  755. .WithMany()
  756. .HasForeignKey("UserId")
  757. .OnDelete(DeleteBehavior.Cascade)
  758. .IsRequired();
  759. });
  760. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b =>
  761. {
  762. b.Navigation("Comments");
  763. b.Navigation("SelectionProcesses");
  764. b.Navigation("TechnologyApplicants");
  765. });
  766. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b =>
  767. {
  768. b.Navigation("SelectionProcesses");
  769. });
  770. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  771. {
  772. b.Navigation("TechnologyApplicants");
  773. });
  774. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  775. {
  776. b.Navigation("Comments");
  777. b.Navigation("Processes");
  778. });
  779. #pragma warning restore 612, 618
  780. }
  781. }
  782. }