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

DatabaseContextModelSnapshot.cs 43KB

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