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

20230210130911_FileEntityChanged.Designer.cs 42KB

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