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

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