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.

20230223130059_ChangedCategoryEntity.Designer.cs 44KB

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