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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243
  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.Category", b =>
  151. {
  152. b.Property<int>("Id")
  153. .ValueGeneratedOnAdd()
  154. .HasColumnType("int");
  155. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  156. b.Property<string>("Name")
  157. .IsRequired()
  158. .HasColumnType("nvarchar(max)");
  159. b.Property<int?>("ParentCategoryId")
  160. .HasColumnType("int");
  161. b.HasKey("Id");
  162. b.HasIndex("ParentCategoryId");
  163. b.ToTable("Categories");
  164. });
  165. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Comment", b =>
  166. {
  167. b.Property<int>("Id")
  168. .ValueGeneratedOnAdd()
  169. .HasColumnType("int");
  170. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  171. b.Property<int>("ApplicantId")
  172. .HasColumnType("int");
  173. b.Property<string>("Content")
  174. .IsRequired()
  175. .HasMaxLength(1024)
  176. .HasColumnType("nvarchar(1024)");
  177. b.Property<DateTime>("DateOfSending")
  178. .HasColumnType("datetime2");
  179. b.Property<int>("UserId")
  180. .HasColumnType("int");
  181. b.HasKey("Id");
  182. b.HasIndex("ApplicantId");
  183. b.HasIndex("UserId");
  184. b.ToTable("Comments");
  185. });
  186. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.FileEntity", b =>
  187. {
  188. b.Property<int>("Id")
  189. .ValueGeneratedOnAdd()
  190. .HasColumnType("int");
  191. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  192. b.Property<int?>("CategoryId")
  193. .HasColumnType("int");
  194. b.Property<bool>("Deleted")
  195. .HasColumnType("bit");
  196. b.Property<Guid>("DocumentId")
  197. .HasColumnType("uniqueidentifier");
  198. b.Property<string>("Note")
  199. .IsRequired()
  200. .HasColumnType("nvarchar(max)");
  201. b.Property<string>("Title")
  202. .IsRequired()
  203. .HasColumnType("nvarchar(max)");
  204. b.HasKey("Id");
  205. b.HasIndex("CategoryId");
  206. b.ToTable("Files");
  207. });
  208. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b =>
  209. {
  210. b.Property<long>("Id")
  211. .ValueGeneratedOnAdd()
  212. .HasColumnType("bigint");
  213. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  214. b.Property<string>("City")
  215. .IsRequired()
  216. .HasColumnType("nvarchar(max)");
  217. b.Property<string>("Country")
  218. .IsRequired()
  219. .HasColumnType("nvarchar(max)");
  220. b.Property<DateTime>("CreatedAtUtc")
  221. .HasColumnType("datetime2");
  222. b.Property<DateTime?>("DeletedAtUtc")
  223. .HasColumnType("datetime2");
  224. b.Property<string>("Fax")
  225. .IsRequired()
  226. .HasColumnType("nvarchar(max)");
  227. b.Property<string>("LegalAddress")
  228. .IsRequired()
  229. .HasColumnType("nvarchar(max)");
  230. b.Property<string>("LegalEmail")
  231. .IsRequired()
  232. .HasColumnType("nvarchar(max)");
  233. b.Property<string>("Name")
  234. .IsRequired()
  235. .HasColumnType("nvarchar(max)");
  236. b.Property<string>("PhoneNumber")
  237. .IsRequired()
  238. .HasColumnType("nvarchar(max)");
  239. b.Property<string>("PostalCode")
  240. .IsRequired()
  241. .HasColumnType("nvarchar(max)");
  242. b.Property<DateTime?>("UpdatedAtUtc")
  243. .HasColumnType("datetime2");
  244. b.HasKey("Id");
  245. b.ToTable("InsuranceCompanies");
  246. });
  247. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  248. {
  249. b.Property<long>("Id")
  250. .ValueGeneratedOnAdd()
  251. .HasColumnType("bigint");
  252. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  253. b.Property<DateTime>("CreatedAtUtc")
  254. .HasColumnType("datetime2");
  255. b.Property<DateTime?>("DeletedAtUtc")
  256. .HasColumnType("datetime2");
  257. b.Property<DateTime>("EndDate")
  258. .HasColumnType("datetime2");
  259. b.Property<long>("InsurerId")
  260. .HasColumnType("bigint");
  261. b.Property<decimal>("Premium")
  262. .HasColumnType("decimal(18,2)");
  263. b.Property<DateTime>("StartDate")
  264. .HasColumnType("datetime2");
  265. b.Property<string>("Type")
  266. .IsRequired()
  267. .HasColumnType("nvarchar(max)");
  268. b.Property<DateTime?>("UpdatedAtUtc")
  269. .HasColumnType("datetime2");
  270. b.HasKey("Id");
  271. b.HasIndex("InsurerId");
  272. b.ToTable("InsurancePolicies");
  273. });
  274. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  275. {
  276. b.Property<long>("Id")
  277. .ValueGeneratedOnAdd()
  278. .HasColumnType("bigint");
  279. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  280. b.Property<string>("Address")
  281. .IsRequired()
  282. .HasColumnType("nvarchar(max)");
  283. b.Property<string>("City")
  284. .IsRequired()
  285. .HasColumnType("nvarchar(max)");
  286. b.Property<string>("Country")
  287. .IsRequired()
  288. .HasColumnType("nvarchar(max)");
  289. b.Property<DateTime>("CreatedAtUtc")
  290. .HasColumnType("datetime2");
  291. b.Property<DateTime>("DateOfBirth")
  292. .HasColumnType("datetime2");
  293. b.Property<DateTime?>("DeletedAtUtc")
  294. .HasColumnType("datetime2");
  295. b.Property<string>("Email")
  296. .IsRequired()
  297. .HasColumnType("nvarchar(max)");
  298. b.Property<string>("FirstName")
  299. .IsRequired()
  300. .HasColumnType("nvarchar(max)");
  301. b.Property<long>("InsuranceCompanyId")
  302. .HasColumnType("bigint");
  303. b.Property<string>("LastName")
  304. .IsRequired()
  305. .HasColumnType("nvarchar(max)");
  306. b.Property<string>("PhoneNumber")
  307. .IsRequired()
  308. .HasColumnType("nvarchar(max)");
  309. b.Property<string>("PostalCode")
  310. .IsRequired()
  311. .HasColumnType("nvarchar(max)");
  312. b.Property<DateTime?>("UpdatedAtUtc")
  313. .HasColumnType("datetime2");
  314. b.HasKey("Id");
  315. b.HasIndex("InsuranceCompanyId");
  316. b.ToTable("Insurers");
  317. });
  318. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Pattern", b =>
  319. {
  320. b.Property<int>("Id")
  321. .ValueGeneratedOnAdd()
  322. .HasColumnType("int");
  323. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  324. b.Property<DateTime>("CreatedAt")
  325. .HasColumnType("datetime2");
  326. b.Property<string>("Message")
  327. .IsRequired()
  328. .HasColumnType("nvarchar(max)");
  329. b.Property<int>("SelectionLevelId")
  330. .HasColumnType("int");
  331. b.Property<string>("Title")
  332. .IsRequired()
  333. .HasColumnType("nvarchar(max)");
  334. b.HasKey("Id");
  335. b.HasIndex("SelectionLevelId");
  336. b.ToTable("Patterns");
  337. });
  338. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  339. {
  340. b.Property<int>("Id")
  341. .ValueGeneratedOnAdd()
  342. .HasColumnType("int");
  343. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  344. b.Property<DateTime>("CreationDate")
  345. .HasColumnType("datetime2");
  346. b.Property<DateTime>("ExpiryDate")
  347. .HasColumnType("datetime2");
  348. b.Property<bool>("Invalidated")
  349. .HasColumnType("bit");
  350. b.Property<string>("JwtId")
  351. .IsRequired()
  352. .HasColumnType("nvarchar(max)");
  353. b.Property<string>("Token")
  354. .IsRequired()
  355. .HasColumnType("nvarchar(max)");
  356. b.Property<bool>("Used")
  357. .HasColumnType("bit");
  358. b.Property<int>("UserId")
  359. .HasColumnType("int");
  360. b.HasKey("Id");
  361. b.HasIndex("UserId");
  362. b.ToTable("RefreshTokens");
  363. });
  364. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b =>
  365. {
  366. b.Property<int>("Id")
  367. .ValueGeneratedOnAdd()
  368. .HasColumnType("int");
  369. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  370. b.Property<string>("Name")
  371. .IsRequired()
  372. .HasColumnType("nvarchar(max)");
  373. b.HasKey("Id");
  374. b.ToTable("SelectionLevels");
  375. b.HasData(
  376. new
  377. {
  378. Id = 1,
  379. Name = "HR intervju"
  380. },
  381. new
  382. {
  383. Id = 2,
  384. Name = "Screening test"
  385. },
  386. new
  387. {
  388. Id = 3,
  389. Name = "Tehnicki intervju"
  390. },
  391. new
  392. {
  393. Id = 4,
  394. Name = "Konacna odluka"
  395. });
  396. });
  397. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", 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<string>("Comment")
  406. .HasColumnType("nvarchar(max)");
  407. b.Property<DateTime?>("Date")
  408. .HasColumnType("datetime2");
  409. b.Property<string>("Link")
  410. .HasColumnType("nvarchar(max)");
  411. b.Property<string>("Name")
  412. .IsRequired()
  413. .HasColumnType("nvarchar(max)");
  414. b.Property<int?>("SchedulerId")
  415. .HasColumnType("int");
  416. b.Property<int>("SelectionLevelId")
  417. .HasColumnType("int");
  418. b.Property<string>("Status")
  419. .IsRequired()
  420. .HasColumnType("nvarchar(max)");
  421. b.HasKey("Id");
  422. b.HasIndex("ApplicantId");
  423. b.HasIndex("SchedulerId");
  424. b.HasIndex("SelectionLevelId");
  425. b.ToTable("SelectionProcesses");
  426. });
  427. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Tag", b =>
  428. {
  429. b.Property<int>("Id")
  430. .ValueGeneratedOnAdd()
  431. .HasColumnType("int");
  432. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  433. b.Property<string>("Name")
  434. .IsRequired()
  435. .HasColumnType("nvarchar(max)");
  436. b.HasKey("Id");
  437. b.ToTable("Tags");
  438. });
  439. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  440. {
  441. b.Property<int>("TechnologyId")
  442. .ValueGeneratedOnAdd()
  443. .HasColumnType("int");
  444. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TechnologyId"), 1L, 1);
  445. b.Property<string>("Name")
  446. .IsRequired()
  447. .HasMaxLength(128)
  448. .HasColumnType("nvarchar(128)");
  449. b.Property<string>("TechnologyType")
  450. .IsRequired()
  451. .HasColumnType("nvarchar(max)");
  452. b.HasKey("TechnologyId");
  453. b.ToTable("Technologies");
  454. });
  455. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  456. {
  457. b.Property<int>("Id")
  458. .ValueGeneratedOnAdd()
  459. .HasColumnType("int");
  460. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  461. b.Property<int>("ApplicantId")
  462. .HasColumnType("int");
  463. b.Property<int>("TechnologyId")
  464. .HasColumnType("int");
  465. b.HasKey("Id");
  466. b.HasIndex("ApplicantId");
  467. b.HasIndex("TechnologyId");
  468. b.ToTable("ApplicantTechnologies");
  469. });
  470. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  471. {
  472. b.Property<int>("Id")
  473. .ValueGeneratedOnAdd()
  474. .HasColumnType("int");
  475. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  476. b.Property<int>("AccessFailedCount")
  477. .HasColumnType("int");
  478. b.Property<string>("ConcurrencyStamp")
  479. .IsConcurrencyToken()
  480. .HasColumnType("nvarchar(max)");
  481. b.Property<string>("Email")
  482. .HasMaxLength(256)
  483. .HasColumnType("nvarchar(256)");
  484. b.Property<bool>("EmailConfirmed")
  485. .HasColumnType("bit");
  486. b.Property<string>("FirstName")
  487. .IsRequired()
  488. .HasColumnType("nvarchar(max)");
  489. b.Property<bool?>("IsEnabled")
  490. .ValueGeneratedOnAdd()
  491. .HasColumnType("bit")
  492. .HasDefaultValue(true);
  493. b.Property<string>("LastName")
  494. .IsRequired()
  495. .HasColumnType("nvarchar(max)");
  496. b.Property<string>("LinkedIn")
  497. .HasColumnType("nvarchar(max)");
  498. b.Property<bool>("LockoutEnabled")
  499. .HasColumnType("bit");
  500. b.Property<DateTimeOffset?>("LockoutEnd")
  501. .HasColumnType("datetimeoffset");
  502. b.Property<string>("NormalizedEmail")
  503. .HasMaxLength(256)
  504. .HasColumnType("nvarchar(256)");
  505. b.Property<string>("NormalizedUserName")
  506. .HasMaxLength(256)
  507. .HasColumnType("nvarchar(256)");
  508. b.Property<string>("PasswordHash")
  509. .HasColumnType("nvarchar(max)");
  510. b.Property<string>("PhoneNumber")
  511. .HasColumnType("nvarchar(max)");
  512. b.Property<bool>("PhoneNumberConfirmed")
  513. .HasColumnType("bit");
  514. b.Property<string>("Position")
  515. .HasColumnType("nvarchar(max)");
  516. b.Property<string>("SecurityStamp")
  517. .HasColumnType("nvarchar(max)");
  518. b.Property<bool>("TwoFactorEnabled")
  519. .HasColumnType("bit");
  520. b.Property<string>("UserName")
  521. .HasMaxLength(256)
  522. .HasColumnType("nvarchar(256)");
  523. b.HasKey("Id");
  524. b.HasIndex("NormalizedEmail")
  525. .HasDatabaseName("EmailIndex");
  526. b.HasIndex("NormalizedUserName")
  527. .IsUnique()
  528. .HasDatabaseName("UserNameIndex")
  529. .HasFilter("[NormalizedUserName] IS NOT NULL");
  530. b.ToTable("AspNetUsers", (string)null);
  531. });
  532. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.UserCategories", b =>
  533. {
  534. b.Property<int>("Id")
  535. .ValueGeneratedOnAdd()
  536. .HasColumnType("int");
  537. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  538. b.Property<int>("CategoryId")
  539. .HasColumnType("int");
  540. b.Property<int>("UserId")
  541. .HasColumnType("int");
  542. b.HasKey("Id");
  543. b.HasIndex("CategoryId");
  544. b.HasIndex("UserId");
  545. b.ToTable("UserCategories");
  546. });
  547. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b =>
  548. {
  549. b.Property<long>("Id")
  550. .ValueGeneratedOnAdd()
  551. .HasColumnType("bigint");
  552. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  553. b.Property<DateTime>("CreatedAtUtc")
  554. .HasColumnType("datetime2");
  555. b.Property<DateTime?>("DeletedAtUtc")
  556. .HasColumnType("datetime2");
  557. b.Property<string>("Description")
  558. .IsRequired()
  559. .HasColumnType("nvarchar(max)");
  560. b.Property<string>("DisplayName")
  561. .IsRequired()
  562. .HasMaxLength(100)
  563. .HasColumnType("nvarchar(100)");
  564. b.Property<string>("Name")
  565. .IsRequired()
  566. .HasMaxLength(100)
  567. .HasColumnType("nvarchar(100)");
  568. b.Property<DateTime?>("UpdatedAtUtc")
  569. .HasColumnType("datetime2");
  570. b.HasKey("Id");
  571. b.ToTable("WebhookDefinitions");
  572. });
  573. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  574. {
  575. b.Property<long>("Id")
  576. .ValueGeneratedOnAdd()
  577. .HasColumnType("bigint");
  578. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  579. b.Property<DateTime>("CreatedAtUtc")
  580. .HasColumnType("datetime2");
  581. b.Property<DateTime?>("DeletedAtUtc")
  582. .HasColumnType("datetime2");
  583. b.Property<bool>("IsActive")
  584. .HasColumnType("bit");
  585. b.Property<DateTime?>("UpdatedAtUtc")
  586. .HasColumnType("datetime2");
  587. b.Property<long>("WebhookDefinitionId")
  588. .HasColumnType("bigint");
  589. b.Property<string>("WebhookURL")
  590. .IsRequired()
  591. .HasColumnType("nvarchar(max)");
  592. b.HasKey("Id");
  593. b.HasIndex("WebhookDefinitionId");
  594. b.ToTable("WebhookSubscriptions");
  595. });
  596. modelBuilder.Entity("FileEntityTag", b =>
  597. {
  598. b.Property<int>("FilesId")
  599. .HasColumnType("int");
  600. b.Property<int>("TagsId")
  601. .HasColumnType("int");
  602. b.HasKey("FilesId", "TagsId");
  603. b.HasIndex("TagsId");
  604. b.ToTable("FileEntityTag");
  605. });
  606. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  607. {
  608. b.Property<int>("Id")
  609. .ValueGeneratedOnAdd()
  610. .HasColumnType("int");
  611. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  612. b.Property<string>("ClaimType")
  613. .HasColumnType("nvarchar(max)");
  614. b.Property<string>("ClaimValue")
  615. .HasColumnType("nvarchar(max)");
  616. b.Property<int>("RoleId")
  617. .HasColumnType("int");
  618. b.HasKey("Id");
  619. b.HasIndex("RoleId");
  620. b.ToTable("AspNetRoleClaims", (string)null);
  621. });
  622. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  623. {
  624. b.Property<int>("Id")
  625. .ValueGeneratedOnAdd()
  626. .HasColumnType("int");
  627. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
  628. b.Property<string>("ClaimType")
  629. .HasColumnType("nvarchar(max)");
  630. b.Property<string>("ClaimValue")
  631. .HasColumnType("nvarchar(max)");
  632. b.Property<int>("UserId")
  633. .HasColumnType("int");
  634. b.HasKey("Id");
  635. b.HasIndex("UserId");
  636. b.ToTable("AspNetUserClaims", (string)null);
  637. });
  638. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  639. {
  640. b.Property<string>("LoginProvider")
  641. .HasColumnType("nvarchar(450)");
  642. b.Property<string>("ProviderKey")
  643. .HasColumnType("nvarchar(450)");
  644. b.Property<string>("ProviderDisplayName")
  645. .HasColumnType("nvarchar(max)");
  646. b.Property<int>("UserId")
  647. .HasColumnType("int");
  648. b.HasKey("LoginProvider", "ProviderKey");
  649. b.HasIndex("UserId");
  650. b.ToTable("AspNetUserLogins", (string)null);
  651. });
  652. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  653. {
  654. b.Property<int>("UserId")
  655. .HasColumnType("int");
  656. b.Property<int>("RoleId")
  657. .HasColumnType("int");
  658. b.HasKey("UserId", "RoleId");
  659. b.HasIndex("RoleId");
  660. b.ToTable("AspNetUserRoles", (string)null);
  661. });
  662. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  663. {
  664. b.Property<int>("UserId")
  665. .HasColumnType("int");
  666. b.Property<string>("LoginProvider")
  667. .HasColumnType("nvarchar(450)");
  668. b.Property<string>("Name")
  669. .HasColumnType("nvarchar(450)");
  670. b.Property<string>("Value")
  671. .HasColumnType("nvarchar(max)");
  672. b.HasKey("UserId", "LoginProvider", "Name");
  673. b.ToTable("AspNetUserTokens", (string)null);
  674. });
  675. modelBuilder.Entity("AdApplicant", b =>
  676. {
  677. b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null)
  678. .WithMany()
  679. .HasForeignKey("AdsId")
  680. .OnDelete(DeleteBehavior.Cascade)
  681. .IsRequired();
  682. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", null)
  683. .WithMany()
  684. .HasForeignKey("ApplicantsApplicantId")
  685. .OnDelete(DeleteBehavior.Cascade)
  686. .IsRequired();
  687. });
  688. modelBuilder.Entity("AdTechnology", b =>
  689. {
  690. b.HasOne("Diligent.WebAPI.Data.Entities.Ad", null)
  691. .WithMany()
  692. .HasForeignKey("AdsId")
  693. .OnDelete(DeleteBehavior.Cascade)
  694. .IsRequired();
  695. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", null)
  696. .WithMany()
  697. .HasForeignKey("TechnologiesTechnologyId")
  698. .OnDelete(DeleteBehavior.Cascade)
  699. .IsRequired();
  700. });
  701. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Category", b =>
  702. {
  703. b.HasOne("Diligent.WebAPI.Data.Entities.Category", "ParentCategory")
  704. .WithMany()
  705. .HasForeignKey("ParentCategoryId");
  706. b.Navigation("ParentCategory");
  707. });
  708. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Comment", b =>
  709. {
  710. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  711. .WithMany("Comments")
  712. .HasForeignKey("ApplicantId")
  713. .OnDelete(DeleteBehavior.Cascade)
  714. .IsRequired();
  715. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  716. .WithMany("Comments")
  717. .HasForeignKey("UserId")
  718. .OnDelete(DeleteBehavior.Cascade)
  719. .IsRequired();
  720. b.Navigation("Applicant");
  721. b.Navigation("User");
  722. });
  723. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.FileEntity", b =>
  724. {
  725. b.HasOne("Diligent.WebAPI.Data.Entities.Category", "Category")
  726. .WithMany("Files")
  727. .HasForeignKey("CategoryId");
  728. b.Navigation("Category");
  729. });
  730. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  731. {
  732. b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer")
  733. .WithMany()
  734. .HasForeignKey("InsurerId")
  735. .OnDelete(DeleteBehavior.Cascade)
  736. .IsRequired();
  737. b.Navigation("Insurer");
  738. });
  739. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  740. {
  741. b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany")
  742. .WithMany()
  743. .HasForeignKey("InsuranceCompanyId")
  744. .OnDelete(DeleteBehavior.Cascade)
  745. .IsRequired();
  746. b.Navigation("InsuranceCompany");
  747. });
  748. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Pattern", b =>
  749. {
  750. b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel")
  751. .WithMany()
  752. .HasForeignKey("SelectionLevelId")
  753. .OnDelete(DeleteBehavior.Cascade)
  754. .IsRequired();
  755. b.Navigation("SelectionLevel");
  756. });
  757. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.RefreshToken", b =>
  758. {
  759. b.HasOne("Diligent.WebAPI.Data.Entities.User", "User")
  760. .WithMany()
  761. .HasForeignKey("UserId")
  762. .OnDelete(DeleteBehavior.Cascade)
  763. .IsRequired();
  764. b.Navigation("User");
  765. });
  766. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionProcess", b =>
  767. {
  768. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  769. .WithMany("SelectionProcesses")
  770. .HasForeignKey("ApplicantId")
  771. .OnDelete(DeleteBehavior.Cascade)
  772. .IsRequired();
  773. b.HasOne("Diligent.WebAPI.Data.Entities.User", "Scheduler")
  774. .WithMany("Processes")
  775. .HasForeignKey("SchedulerId")
  776. .OnDelete(DeleteBehavior.SetNull);
  777. b.HasOne("Diligent.WebAPI.Data.Entities.SelectionLevel", "SelectionLevel")
  778. .WithMany("SelectionProcesses")
  779. .HasForeignKey("SelectionLevelId")
  780. .OnDelete(DeleteBehavior.Cascade)
  781. .IsRequired();
  782. b.Navigation("Applicant");
  783. b.Navigation("Scheduler");
  784. b.Navigation("SelectionLevel");
  785. });
  786. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.TechnologyApplicant", b =>
  787. {
  788. b.HasOne("Diligent.WebAPI.Data.Entities.Applicant", "Applicant")
  789. .WithMany("TechnologyApplicants")
  790. .HasForeignKey("ApplicantId")
  791. .OnDelete(DeleteBehavior.Cascade)
  792. .IsRequired();
  793. b.HasOne("Diligent.WebAPI.Data.Entities.Technology", "Technology")
  794. .WithMany("TechnologyApplicants")
  795. .HasForeignKey("TechnologyId")
  796. .OnDelete(DeleteBehavior.Cascade)
  797. .IsRequired();
  798. b.Navigation("Applicant");
  799. b.Navigation("Technology");
  800. });
  801. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.UserCategories", b =>
  802. {
  803. b.HasOne("Diligent.WebAPI.Data.Entities.Category", "Category")
  804. .WithMany("UserCategories")
  805. .HasForeignKey("CategoryId")
  806. .OnDelete(DeleteBehavior.Cascade)
  807. .IsRequired();
  808. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  809. .WithMany("UserCategories")
  810. .HasForeignKey("UserId")
  811. .OnDelete(DeleteBehavior.Cascade)
  812. .IsRequired();
  813. b.Navigation("Category");
  814. });
  815. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  816. {
  817. b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition")
  818. .WithMany()
  819. .HasForeignKey("WebhookDefinitionId")
  820. .OnDelete(DeleteBehavior.Cascade)
  821. .IsRequired();
  822. b.Navigation("WebhookDefinition");
  823. });
  824. modelBuilder.Entity("FileEntityTag", b =>
  825. {
  826. b.HasOne("Diligent.WebAPI.Data.Entities.FileEntity", null)
  827. .WithMany()
  828. .HasForeignKey("FilesId")
  829. .OnDelete(DeleteBehavior.Cascade)
  830. .IsRequired();
  831. b.HasOne("Diligent.WebAPI.Data.Entities.Tag", null)
  832. .WithMany()
  833. .HasForeignKey("TagsId")
  834. .OnDelete(DeleteBehavior.Cascade)
  835. .IsRequired();
  836. });
  837. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
  838. {
  839. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  840. .WithMany()
  841. .HasForeignKey("RoleId")
  842. .OnDelete(DeleteBehavior.Cascade)
  843. .IsRequired();
  844. });
  845. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
  846. {
  847. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  848. .WithMany()
  849. .HasForeignKey("UserId")
  850. .OnDelete(DeleteBehavior.Cascade)
  851. .IsRequired();
  852. });
  853. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
  854. {
  855. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  856. .WithMany()
  857. .HasForeignKey("UserId")
  858. .OnDelete(DeleteBehavior.Cascade)
  859. .IsRequired();
  860. });
  861. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
  862. {
  863. b.HasOne("Diligent.WebAPI.Data.Entities.AppRole", null)
  864. .WithMany()
  865. .HasForeignKey("RoleId")
  866. .OnDelete(DeleteBehavior.Cascade)
  867. .IsRequired();
  868. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  869. .WithMany()
  870. .HasForeignKey("UserId")
  871. .OnDelete(DeleteBehavior.Cascade)
  872. .IsRequired();
  873. });
  874. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
  875. {
  876. b.HasOne("Diligent.WebAPI.Data.Entities.User", null)
  877. .WithMany()
  878. .HasForeignKey("UserId")
  879. .OnDelete(DeleteBehavior.Cascade)
  880. .IsRequired();
  881. });
  882. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Applicant", b =>
  883. {
  884. b.Navigation("Comments");
  885. b.Navigation("SelectionProcesses");
  886. b.Navigation("TechnologyApplicants");
  887. });
  888. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Category", b =>
  889. {
  890. b.Navigation("Files");
  891. b.Navigation("UserCategories");
  892. });
  893. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.SelectionLevel", b =>
  894. {
  895. b.Navigation("SelectionProcesses");
  896. });
  897. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Technology", b =>
  898. {
  899. b.Navigation("TechnologyApplicants");
  900. });
  901. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  902. {
  903. b.Navigation("Comments");
  904. b.Navigation("Processes");
  905. b.Navigation("UserCategories");
  906. });
  907. #pragma warning restore 612, 618
  908. }
  909. }
  910. }